title: get_terms() orderby name is not working - wordpress
body: <p>I'm using wordpress, want first-level taxonomy terms to be ordered by name but below code is not giving me desired result. Here is my code:</p>
  
  <pre><code>$args = array(
      'taxonomy' =&gt; 'tax-category', 
      'hide_empty' =&gt; 0,
      'hierarchical' =&gt; 1,
      'parent' =&gt; 0,
      'orderby'=&gt;'name',
      'order' =&gt; 'DESC',
      'fields' =&gt; 'all',
  );
  $rs_terms = get_terms('tax-category', $args);
  </code></pre>
  
  <p>When I'm adding below php sorting, it works perfectly. But want to know why wordpress's default sorting is not working properly:</p>
  
  <pre><code>usort($rs_terms, function($a, $b){
      return strcmp($a-&gt;name, $b-&gt;name);
  });
  </code></pre>