tra('Monospace'), 'documentation' => 'PluginMono', 'description' => tra('Display text in a monospace font'), 'prefs' => [ 'wikiplugin_mono' ], 'body' => tra('Text that the font will be applied to'), 'iconname' => 'font', 'introduced' => 1, 'params' => [ 'font' => [ 'required' => false, 'name' => tra('Font'), 'description' => tra('Font name as recognized by browsers.'), 'since' => '1', 'default' => 'monospace', 'filter' => 'text', ], ], ]; } function wikiplugin_mono($data, $params) { global $tikilib; extract($params, EXTR_SKIP); $code = /* htmlentities( htmlspecialchars(*/ trim($data) /* ) )*/; $code = preg_replace("/\n/", "
", $code); if (! isset($font)) { $font = "monospace"; } else { $font .= ", monospace"; } $style = "style=\"font-family: " . $font . ";\""; $data = "" . $code . ""; return $data; }