You are here

function tb_megamenu_find_menu_item in The Better Mega Menu 7

1 call to tb_megamenu_find_menu_item()
tb_megamenu_get_menu_item in ./tb_megamenu.functions.inc

File

./tb_megamenu.functions.inc, line 199

Code

function tb_megamenu_find_menu_item($tree, $mlid) {
  foreach ($tree as $item) {
    if ($item['link']['mlid'] == $mlid) {
      return $item;
    }
    else {
      $result = tb_megamenu_find_menu_item($item['below'], $mlid);
      if ($result) {
        return $result;
      }
    }
  }
  return NULL;
}