Compare commits
2 Commits
90eb660a15
...
3b1f83d4c7
Author | SHA1 | Date |
---|---|---|
buttle | 3b1f83d4c7 | |
buttle | 3f9aaa69a5 |
|
@ -43,7 +43,8 @@ if ($wordpress_endpoint) {
|
|||
"title" => $item_title,
|
||||
"url" => $item_url
|
||||
];
|
||||
if (!array_key_exists($menu_item->menu_item_parent, $items)) {
|
||||
if (!isset($items[$menu_item->menu_item_parent])) {
|
||||
//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;
|
||||
|
@ -88,7 +89,8 @@ 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 (array_key_exists($menu_item['id'], $items)) {
|
||||
if (isset($items[$menu_item['id']])) {
|
||||
//if (array_key_exists($menu_item['id'], $items)) {
|
||||
render_menu($items, $menu_item['id']); // render sub menu
|
||||
}
|
||||
echo '</li>' . PHP_EOL;
|
||||
|
|
Loading…
Reference in New Issue