You are here

function taxonomy_menu_build_menu_tree in Taxonomy menu 6.3

This function orders the items array correctly.

1 call to taxonomy_menu_build_menu_tree()
taxonomy_menu_save_menu_set_rtln in ./taxonomy_menu.admin.inc
Save a Term Set/mneugrpou Reltn

File

./taxonomy_menu.admin.inc, line 945
admin section for taxonomy menu

Code

function taxonomy_menu_build_menu_tree($items) {
  if (!$items) {
    return $items;
  }

  // Setup up output array
  $tree = array();
  foreach ($items as $key => $item) {
    $tree[$key] = $item;

    // Get the children
    $tree = array_merge($tree, _taxonomy_menu_build_menu_tree($items, $key));
  }
  return $tree;
}