Manual:Hooks/LinkerMakeExternalLink

Details

 * &$url: The URL of the external link
 * &$text: The link text that would normally be displayed on the page
 * &$link: The link HTML if you choose to override the default.
 * &$link: Link attributes (added in MediaWiki 1.15, r48223)

You need to return false if you want to modify the HTML of external links, returning true will produce the normal external link HTML, regardless of if $link is set to something. Please note that you will need to include all parts of the HTML in $link, including the  tag, if you choose to return false.