koblog/bl-plugins/about/plugin.php
Kazhnuz 7c668fea4e ️ Don't use titles in sidebar
Use labelled landmarks. It'll allow for the titles to be handled for the documents section only.
2025-09-06 15:51:12 +02:00

37 lines
871 B
PHP

<?php
class pluginAbout extends Plugin
{
public function init()
{
$this->dbFields = array(
'label' => 'About'
);
}
public function form()
{
global $L;
$html = '<div>';
$html .= '<label>' . $L->get('Label') . '</label>';
$html .= '<input name="label" type="text" dir="auto" value="' . $this->getValue('label') . '">';
$html .= '<span class="tip">' . $L->get('This title is almost always used in the sidebar of the site') . '</span>';
$html .= '</div>';
return $html;
}
public function siteSidebar()
{
$html = '<div class="plugin plugin-about" aria-labelledby="plugin-about-label">';
$html .= '<p id="plugin-about-label" class="plugin-label">' . $this->getValue('label') . '</p>';
$html .= '<div class="plugin-content">';
$html .= Theme::getHomepagePresentation();
$html .= '</div>';
$html .= '</div>';
return $html;
}
}