s/twitter/x/g #9

Merged
n merged 1 commit from x into main 2024-06-16 14:33:33 +02:00

View file

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