e4ec5a79b9733435931a4369b1be702733984731
4 * Various core link functions, registered in Parser::firstCallInit()
7 class CoreLinkFunctions
{
8 static function register( $parser ) {
13 static function defaultLinkHook( $markers, Title
$title, $titleText, &$displayText = null, &$leadingColon = false ) {
14 # Warning: This hook should NEVER return true as it is the fallback
15 # default for when other hooks return true
16 if( $markers->findMarker( $displayText ) ) {
17 # There are links inside of the displayText
18 # For backwards compatibility the deepest links are dominant so this
19 # link should not be handled
20 $displayText = $markers->expand($displayText);
21 # Return false so that this link is reverted back to WikiText
24 return $markers->holders()->makeHolder( $title, isset($displayText) ?
$displayText : $titleText, '', '', '' );