Compare commits
No commits in common. "3b1f83d4c7bd5b927e63e59a51b46e7c6228da8b" and "90eb660a1543ec4fa08b0109571675cc5730e728" have entirely different histories.
3b1f83d4c7
...
90eb660a15
|
@ -43,8 +43,7 @@ if ($wordpress_endpoint) {
|
||||||
"title" => $item_title,
|
"title" => $item_title,
|
||||||
"url" => $item_url
|
"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] = new ArrayObject();
|
||||||
}
|
}
|
||||||
$items[$menu_item->menu_item_parent][$menu_item->ID] =$item;
|
$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 '<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;
|
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
|
render_menu($items, $menu_item['id']); // render sub menu
|
||||||
}
|
}
|
||||||
echo '</li>' . PHP_EOL;
|
echo '</li>' . PHP_EOL;
|
||||||
|
|
Loading…
Reference in New Issue