Get terms by taxonomy AND post_type
I have 2 custom post types ‘bookmarks’ and ‘snippets’ and a shared taxonomy ‘tag’. I can generate a list of all terms in the taxonomy with get_terms(), but I can’t figure out how to limit the list to the post type. What I’m basically looking for is something like this:
get_terms(array('taxonomy' => 'tag', 'post_type' => 'snippet'));
Is there a way to achieve this? Ideas are greatly appreciated!!
Oh, I’m on WP 3.1.1