Compare commits
1 Commits
cf52ed2036
...
745ac3077d
Author | SHA1 | Date |
---|---|---|
n | 745ac3077d |
|
@ -17,7 +17,7 @@ function hook_clickat_render_linklist($data)
|
||||||
'/([^\S]+)@([\w]+)/' => ' <a href="https://twitter.com/\2">@\2</a>'
|
'/([^\S]+)@([\w]+)/' => ' <a href="https://twitter.com/\2">@\2</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']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue