improves item title comparisons
This commit is contained in:
parent
27ed8e6db5
commit
f9d2d65931
|
@ -17,12 +17,13 @@ if ($wordpress_endpoint) {
|
||||||
|
|
||||||
if (!$response->isClientError() && $response_data) {
|
if (!$response->isClientError() && $response_data) {
|
||||||
foreach ($response_data as $menu_item) {
|
foreach ($response_data as $menu_item) {
|
||||||
|
$lowered_title = strtolower($menu_item->title);
|
||||||
$item_url = $menu_item->url;
|
$item_url = $menu_item->url;
|
||||||
if (strtolower($menu_item->title) == 'login') {
|
if ($lowered_title == 'login') { // manipulate login url
|
||||||
$item_url = "/login";
|
$item_url = "/login";
|
||||||
}
|
}
|
||||||
$item_title = $menu_item->title;
|
$item_title = $menu_item->title;
|
||||||
if (strtolower($menu_item->title) == 'collections') {
|
if ($lowered_title == 'collections') { // change Collections item
|
||||||
$item_title = "Project";
|
$item_title = "Project";
|
||||||
$item_url = $wordpress_site;
|
$item_url = $wordpress_site;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue