123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class DefaultLayoutPlugin extends Plugin
- {
- const PLUGIN_VERSION = '2.0.0';
- public $prerender_replyforms = false;
- public function onEndShowThreadedNoticeTail(NoticeListItem $nli, Notice $notice, array $notices) {
- if ($this->prerender_replyforms) {
- $nli->out->elementStart('li', array('class'=>'notice-reply', 'style'=>'display: none;'));
- $replyForm = new NoticeForm($nli->out, array('inreplyto' => $notice->getID()));
- $replyForm->show();
- $nli->out->elementEnd('li');
- }
- return true;
- }
- public function onPluginVersion(array &$versions): bool
- {
- $versions[] = array('name' => 'Default Layout',
- 'version' => self::PLUGIN_VERSION,
- 'author' => 'Mikael Nordfeldth',
- 'homepage' => 'https://www.gnu.org/software/social/',
- 'rawdescription' =>
-
- _m('Optional default layout elements.'));
- return true;
- }
- }
|