tra('Definition List'),
'documentation' => 'PluginDL',
'description' => tra('Create a definition list'),
'prefs' => ['wikiplugin_dl'],
'body' => tr('One entry per line. Each line is in %0Term: Definition%1 format.', '', ''),
'iconname' => 'list',
'tags' => [ 'basic' ],
'introduced' => 1,
'params' => [
'type' => [
'required' => false,
'name' => tra('List Type'),
'description' => tra('Type of definition list (left-aligned or horizontal).'),
'since' => '16.0',
'filter' => 'text',
'safe' => true,
'advanced' => false,
'options' => [
['text' => '', 'value' => ''],
['text' => tra('Standard (left-aligned)'), 'value' => 's'],
['text' => tra('Horizontal (inline) '), 'value' => 'h'],
],
'default' => '',
],
],
];
}
function wikiplugin_dl($data, $params)
{
global $tikilib;
global $replacement;
if (isset($param)) {
extract($params, EXTR_SKIP);
}
if (isset($params["type"])) {
$dlt = $params["type"];
if ($dlt == "horizontal" or $dlt == "dl-horizontal" or $dlt == "horiz" or $dlt == "h" or $dlt == "inline") {
$result = '