wordpress-menu #56
|
@ -74,10 +74,20 @@ if (count($items[0]) == 0) {
|
|||
|
||||
if (!function_exists('render_menu')) {
|
||||
function render_menu($items, $level_id) {
|
||||
echo '<ul>' . PHP_EOL;
|
||||
if ($level_id == 0) {
|
||||
echo '<ul id="" class="dropdown menu" data-dropdown-menu="dropdown-menu" role="menubar">'.
|
||||
PHP_EOL;
|
||||
} else {
|
||||
echo '<ul class="dropdown menu vertical submenu is-dropdown-submenu first-sub" data-toggle="" data-submenu="" role="">'.
|
||||
PHP_EOL;
|
||||
}
|
||||
foreach ($items[$level_id] as $menu_item) {
|
||||
echo '<li>' . PHP_EOL;
|
||||
echo '<a href="'.$menu_item['url'].'">'.$menu_item['title'].'</a>' . PHP_EOL;
|
||||
if ($level_id == 0) {
|
||||
echo '<li id="" class="" role="">'.PHP_EOL;
|
||||
} else {
|
||||
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)) {
|
||||
render_menu($items, $menu_item['id']); // render sub menu
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue