Manual:Hooks/LinkEnd

Warning
In MediaWiki 1.28 this hook has been superseded by HtmlPageLinkRendererEnd. is considered outdated.

Details
If you return true, an  element with HTML attributes $attribs and contents $html will be returned. If you return false, $ret (which defaults to null) will be returned.


 * : used to be a skin, but that was eliminated.
 * : the Title object that the link is pointing to.
 * : the options. Can include 'known', 'broken', 'noclasses', 'forcearticlepath', 'http', or 'https'.
 * : the HTML contents of the  element, i.e., the link text. This is raw HTML and will not be escaped. If null, defaults to the prefixed text of the Title; or if the Title is just a fragment, the contents of the fragment.
 * : the final HTML attributes of the  tag, after processing, in associative array form.
 * : 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.

Example
The following code will show all wikilinks and interwiki links as broken (i.e. as red links) by using the "new" class: