Trouble with TenderApp link in menu
-
I’m using the Multipass plugin to create an SSO login link to TenderApp.
Works fine.
Except I’m trying to add a link to the TenderApp forum in the menu.
In the header.php file of the theme I’m doing the following:
function my_forum_wrap() { if (memb_is_loggedin()) { $url = multipass(); $link = "<a href='".$url."' target='_blank'>Forum</a>"; $wrap = '<ul id="%1$s" class="%2$s">'; $wrap .= '%3$s'; $wrap .= "<li class='menu-item'>".$link."</li></ul>"; return $wrap; } } wp_nav_menu(array( 'theme_location' => 'topbar', 'menu_id' => 'topbar-menu', 'depth' => defined('SO_IS_PREMIUM') ? 2 : 1, 'fallback_cb' => 'pitch_fallback_nav', 'walker' => new Pitch_Walker_Nav_Menu, 'items_wrap' => my_forum_wrap(), ));
When I run it like this it breaks the function and no menu is outputted. If I just echo multipass() it spits out the URL on the screen just fine. If i just hardcode a random URL in there, it works fine. I’ve done a var_dump of what multipass() is returning and it’s just a string URL that looks like this: https://esupport-forum.tenderapp.com?sso=nWxbYLxasdfS1ILXQx%2B9jKTUiit9qlR5hY%2FZFm8gD5hHgfstHi0Wk7r4MglfCY27esUhn00JkaszuD6bfdsB9rMMcSPG%2FhOasdX8HowBnZv8bczooWRQvJ4Qbs2z79L4ZpmWsGoW6kas7S4cp3jsq7CuMFQTHdVnZfd1vPDs2CsWp90ispQgfdrQoh3z35yTo%3D I can’t understand why putting the URL into the wp_nav_menu function breaks it.
Any ideas?
- The topic ‘Trouble with TenderApp link in menu’ is closed to new replies.