ci #7

Merged
n merged 2 commits from ci into main 2024-02-11 21:59:09 +01:00
Showing only changes of commit 1989307a67 - Show all commits

View file

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