title: get_categories for Custom Post Type
body: <p>I have a Custom Post Type, 'ioni_codex'
  I am using built-in Wordpress category as taxonomy</p>
  
  <p>I want to list all categories used by 'ioni_codex'.</p>
  
  <p>I assume that this code will do the trick:</p>
  
  <pre><code>$myargs = array (
      'type' =&gt; 'ioni_codex'
  ); 
  $categories = get_categories( $myargs );
  </code></pre>
  
  <p>However instead I see the list of <em>all categories</em> not the categories assigned to by 'ioni_codex'.</p>
  
  <p>What Am I doing wrong?</p>