Autofill username – Supposed syntax error
-
I’ve added two links to two different bbpress pages that link to the new-message page and shall autofill the username. The one I added on the user’s profile page works perfectly.
<a class="send-message-link1" href="mysite/messages/?fepaction=newmessage&to=<?=preg_replace('/^wg_/i','',bbp_get_displayed_user_field('display_name'))?>">Message</a>
Same href-part added via functions.php for my bbpress topic template results in a blank page. This code gets my site back but does not add any username to url (and no autofill):
`$links[‘add_link’] .= ‘<a class=”send-message-link2″ href=”mysite/messages/?fepaction=newmessage&to=’.”. preg_replace(‘/^wg_/i’,”,bbp_get_displayed_user_field(‘display_name’)).'”>Message</a>’;
`Suppose I missed some php rules right here as to above behavior by to amendmends. unusual highlighting of colors seem to give me that hint as well.
Would be very happy about any help!
[Sorry, dont get the backticks to work as they should]
- The topic ‘Autofill username – Supposed syntax error’ is closed to new replies.