improves item title comparisons

This commit is contained in:
buttle 2022-03-25 11:25:32 +01:00
parent 27ed8e6db5
commit f9d2d65931
1 changed files with 3 additions and 2 deletions

View File

@ -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;
}