koblog/bl-plugins/socials/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

40 lines
No EOL
1,001 B
PHP

<?php
class pluginSocials extends Plugin {
public function init()
{
$this->dbFields = array(
'label' => 'Social Networks',
);
}
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;
}
// Method called on the sidebar of the website
public function siteSidebar()
{
global $L;
global $url;
$html = '<div class="plugin plugin-archives" aria-labelledby="plugin-archives-label">';
$html .= '<p class="plugin-label" id="plugin-archives-label">' . $this->getValue('label') . '</p>';
$html .= '<div class="plugin-content">';
$html .= Theme::listSiteSocials(true, true);
$html .= '</div>';
$html .= '</div>';
return $html;
}
}