Compare commits

..

1 commit

Author SHA1 Message Date
n
13235cc0fb
PHP-CS-Fixer fixes 2024-09-14 17:14:44 +02:00

View file

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