title: Add wordpress taxonomy term slug as a class to terms
body: <p>I have the following question. For a project i am working on i am using get_the_term_list to echo all terms from a particular post and taxonomy. No i need to be able to style every term that gets echoed out a different way. For this to work i would like to add the term->slug as a class to the list item, but im not able to make this work. I know how to add the slugs to the ul but thats not what i need because then i am not able to style the individual list items based on their slug. </p>
  
  <p>so at this point i am using this to get all the terms based on the current post:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php echo get_the_term_list( $post-&gt;ID, 'thema',  '&lt;ul class="project-themes no-bullet"&gt;&lt;li&gt;', '&lt;/li&gt;&lt;li&gt;', '&lt;/li&gt;&lt;/ul&gt;'  ); ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Does someone have a clue how to get the slug of the terms as a class on the li. So i get something like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php echo get_the_term_list( $post-&gt;ID, 'thema',  '&lt;ul class="project-themes no-bullet"&gt;&lt;li class="term-&gt;slug"&gt;', '&lt;/li&gt;&lt;li class="term-&gt;slug"&gt;', '&lt;/li&gt;&lt;/ul&gt;'  ); ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Hope someone can help me with this.</p>