Skip to content

Commit

Permalink
First working version
Browse files Browse the repository at this point in the history
  • Loading branch information
c0ldplasma committed Jul 5, 2020
1 parent 4274898 commit 5d3809b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xExtension-TwitterResolver/extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public function convertTwitterUrls($entry)
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$a = curl_exec($ch);
$url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
$entry->content() = str_replace($match, $url, $entry->content());
$entry->_content(str_replace($matches[0], '<a href="' . $url . '">' . $url . '</a>', $entry->content()));
$entry->_title(str_replace($matches[0], $url, $entry->content()));
}

return $entry;
Expand Down

0 comments on commit 5d3809b

Please sign in to comment.