s/twitter/x/g #9

Merged
n merged 1 commit from x into main 2024-06-16 14:33:33 +02:00
Showing only changes of commit c843ecff7f - Show all commits

View file

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