diff --git a/classes/Renderer/User.php b/classes/Renderer/User.php index 4bff05315d..c4758f5f43 100644 --- a/classes/Renderer/User.php +++ b/classes/Renderer/User.php @@ -104,6 +104,7 @@ private function addLoggedInLinks() { ); $this->addContactLink(); + $this->addDonateLink(); } private function addLoggedOutLinks() { @@ -163,6 +164,7 @@ private function addLoggedOutLinks() { $this->addRepLinks(); $this->addContactLink(); + $this->addDonateLink(); } // add links to your MP etc if postcode set @@ -207,4 +209,22 @@ private function addContactLink() { ); } + private function addDonateLink() { + // In the long run, we should have a little page on this site and go through the normal metadata process + // for storing the link. + + if (LANGUAGE == 'cy') { + $text = 'Cyfrannwch'; + } else { + $text = 'Donate'; + } + + $this->data['user_nav_links'][] = array( + 'href' => "https://www.mysociety.org/donate?utm_source=theyworkforyou.com&utm_content=top-bar&utm_medium=link&utm_campaign=mysoc_header", + 'title' => $text, + 'classes' => '', + 'text' => $text + ); + } + }