2019-09-29 14:30:55 +01:00

21 lines
397 B
PHP

<?php
/**
* Class Emoticons
*/
class Emoticons extends FormatterExtension
{
public function format(string $text): string
{
$data_href = get_base_href();
$text = preg_replace("/:([a-z]*?):/s", "<img src='$data_href/ext/emoticons/default/\\1.gif'>", $text);
return $text;
}
public function strip(string $text): string
{
return $text;
}
}