To do that you must use embedded new taxonomy functions inside plugin’s source :
get_terms_of_groups_new ( $group_id, $taxonomy, $taxonomy_child, $args )
Here I write a ‘raw’ example delivering expected array (here only print_r)
/**
* example of selection of tags of a group as used in xili-tidy-tags dashboard<br />
* only for tests<br />
*
*/
function xili_tags_from_group($group_name) {
// from $group_name to ID
$taxonomy = TAXOTIDYTAGS ;
$taxonomy_child = 'post_tag' ;
$groupterm = term_exists($group_name, $taxonomy);
$group_id = $groupterm['term_id'];
// return array of tags as object
$args = array('orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false ); // even if no post attached to a tag - see doc inside source of xili-tidy-tags
$thetags = get_terms_of_groups_new ( $group_id, $taxonomy, $taxonomy_child, $args );>
print_r($thetags);
// example of array as expected by S.Y. but here with key -
$result_array = array();
if ( $thetags ) {
foreach ( $thetags as $onetag ) {
$result_array[] = array('tag_name' => $onetag->name, 'tag_id' => $onetag->term_id);
}
print_r($result_array);
}
}
The default taxonomy (see file taxonomy.php in folder wp-includes) is very poweful but don’t include the queries to group tags under one another tag. Is is the purpose of this plugin xili-tidy-tags created since WP 2.7 ! Initially created to group tags by language, he structurally contains all functions to group tags by semantic groups AND one tag can belong to one or more groups.
Michel
dev.xiligroup.com