Manual:Hooks/LinkEnd

Details
If you return true, an  element with HTML attributes $attribs and contents $text will be returned. If you return false, $ret will be returned.
 * $skin: the Skin object. As of 1.18, this is a DummyLinker instead
 * $target: the Title object that the link is pointing to
 * $options: the options. Will always include either 'known' or 'broken', and may include 'noclasses'.
 * &$text: the final (raw HTML) contents of the  tag, after processing.
 * &$attribs: the final HTML attributes of the  tag, after processing, in associative array form.
 * &$ret: the value to return if your hook returns false.

Note that this hook can allow changes to interwiki links (detect class attribute is set to "extiw" to change $ret, and if not, return true). Since Html::rawElement is not immediately available to this hook, one may able to use Xml::tags in its place.