Compare commits

..

No commits in common. "3b1f83d4c7bd5b927e63e59a51b46e7c6228da8b" and "90eb660a1543ec4fa08b0109571675cc5730e728" have entirely different histories.

1 changed files with 2 additions and 4 deletions

View File

@ -43,8 +43,7 @@ if ($wordpress_endpoint) {
"title" => $item_title,
"url" => $item_url
];
if (!isset($items[$menu_item->menu_item_parent])) {
//if (!array_key_exists($menu_item->menu_item_parent, $items)) {
if (!array_key_exists($menu_item->menu_item_parent, $items)) {
$items[$menu_item->menu_item_parent] = new ArrayObject();
}
$items[$menu_item->menu_item_parent][$menu_item->ID] =$item;
@ -89,8 +88,7 @@ if (!function_exists('render_menu')) {
echo '<li id="" class="is-submenu-item is-dropdown-submenu-item" role="">'.PHP_EOL;
}
echo '<a role="" href="'.$menu_item['url'].'">'.$menu_item['title'].'</a>'.PHP_EOL;
if (isset($items[$menu_item['id']])) {
//if (array_key_exists($menu_item['id'], $items)) {
if (array_key_exists($menu_item['id'], $items)) {
render_menu($items, $menu_item['id']); // render sub menu
}
echo '</li>' . PHP_EOL;