function _taxonomy_action_parse_terms in Views Bulk Operations (VBO) 6
Same name and namespace in other branches
- 6.3 taxonomy.action.inc \_taxonomy_action_parse_terms()
Take a multi-dimensional array of vocabularies -> selected terms and return an array of only the terms selected
2 calls to _taxonomy_action_parse_terms()
File
- actions/
taxonomy.action.inc, line 183
Code
function _taxonomy_action_parse_terms($taxonomy) {
$ret = array();
while (list($key, $vocab) = each($taxonomy)) {
if ($key == 'tags') {
$ret['tags'] = $vocab;
}
else {
if (!is_array($vocab)) {
if (!empty($vocab)) {
$ret[] = $vocab;
}
}
else {
while (list(, $tid) = each($vocab)) {
if (!empty($tid)) {
$ret[] = $tid;
}
}
}
}
}
return $ret;
}