Compare commits
2 Commits
f79b7af69c
...
f9d2d65931
Author | SHA1 | Date |
---|---|---|
buttle | f9d2d65931 | |
buttle | 27ed8e6db5 |
|
@ -17,12 +17,13 @@ if ($wordpress_endpoint) {
|
|||
|
||||
if (!$response->isClientError() && $response_data) {
|
||||
foreach ($response_data as $menu_item) {
|
||||
$lowered_title = strtolower($menu_item->title);
|
||||
$item_url = $menu_item->url;
|
||||
if (strtolower($menu_item->title) == 'login') {
|
||||
if ($lowered_title == 'login') { // manipulate login url
|
||||
$item_url = "/login";
|
||||
}
|
||||
$item_title = $menu_item->title;
|
||||
if (strtolower($menu_item->title) == 'collections') {
|
||||
if ($lowered_title == 'collections') { // change Collections item
|
||||
$item_title = "Project";
|
||||
$item_url = $wordpress_site;
|
||||
}
|
||||
|
@ -54,6 +55,8 @@ function render_menu($items, $level_id) {
|
|||
echo '</ul>' . PHP_EOL;
|
||||
}
|
||||
|
||||
render_menu($items, 0);
|
||||
if (count($items[0]) > 0) {
|
||||
render_menu($items, 0);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue