function content_taxonomy_node_import_tree_adjust in Node import 6
This is for fixing the output of the tree widget type.
Parameters
<type> $terms:
<type> $data:
<type> $results:
1 call to content_taxonomy_node_import_tree_adjust()
- content_taxonomy_node_import_values_alter in supported/
content_taxonomy/ content_taxonomy.inc - Implementation of hook_node_import_values_alter()
File
- supported/
content_taxonomy/ content_taxonomy.inc, line 281 - Support file for the CCK Content Taxonomy module
Code
function content_taxonomy_node_import_tree_adjust(&$terms, &$data, &$results) {
foreach ($data['children'] as $id => $contents) {
if (key_exists($id, $terms)) {
$results[$id] = array(
'checkbox' => $id,
);
if (!empty($terms[$id]['children'])) {
content_taxonomy_node_import_tree_adjust($terms, $terms[$id], $results[$id]['children']);
}
else {
// Unset the item from the terms list; this should be a leaf term
unset($terms[$id]);
}
}
}
}