X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Finvitebuttonsection.php;h=37bbfe92a2bd3d22462c4d8440249a8567fa3a6c;hb=15ab9ff9e3303255ff14166ee86ffdf3bc4f52ce;hp=c10817d7a86297605e7fcb02f9e48662281b1be4;hpb=c27b9c07226d655e9933ef7a824dc75a174e26e1;p=quix0rs-gnu-social.git diff --git a/lib/invitebuttonsection.php b/lib/invitebuttonsection.php index c10817d7a8..37bbfe92a2 100644 --- a/lib/invitebuttonsection.php +++ b/lib/invitebuttonsection.php @@ -46,18 +46,39 @@ if (!defined('STATUSNET')) { */ class InviteButtonSection extends Section { + protected $buttonText; + + function __construct($out = null, $buttonText = null) + { + $this->out = $out; + if (empty($buttonText)) { + // TRANS: Default button text for inviting more users to the StatusNet instance. + $this->buttonText = _m('BUTTON', 'Invite more people'); + } else { + $this->buttonText = $buttonText; + } + } + function showTitle() { return false; } + function divId() + { + return 'invite_button'; + } + function showContent() { - $this->out->element('a', - array('href' => common_local_url('invite'), - 'class' => 'invite_button'), - // TRANS: Button text for inviting more users to the StatusNet instance. - _m('BUTTON','Invite more colleagues')); + $this->out->element( + 'a', + array( + 'href' => common_local_url('invite'), + 'class' => 'invite_button' + ), + $this->buttonText + ); return false; } }