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.
 * &$attribs: Link attributes (added in MediaWiki 1.15, r48223)
 * $linktype: Type of external link, e.g. 'free', 'text', 'autonumber'. Gets added to the css classes. (added in MediaWiki 1.15, r48226)

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.

To modify interwiki external links, see Manual:Hooks/LinkEnd.