Compare commits

..

1 commit

Author SHA1 Message Date
n
745ac3077d
regex fixes 2024-02-25 20:41:33 +01:00

View file

@ -17,7 +17,7 @@ function hook_clickat_render_linklist($data)
'/([^\S]+)@([\w]+)/' => ' <a href="https://twitter.com/\2">&commat;\2</a>'
);
foreach ($data['links'] as &$value) {
if (strpos($value['description'], ' @') !== false) {
if (strpos($value['description'], '@') !== false) {
foreach($patterns as $nic => $link) {
$value['description'] = preg_replace($nic, $link, $value['description']);
}