* Missing svn:eol-style property on Parser_LinkHooks.php
[lhc/web/wiklou.git] / includes / parser / CoreLinkFunctions.php
1 <?php
2
3 /**
4 * Various core link functions, registered in Parser::firstCallInit()
5 * @ingroup Parser
6 */
7 class CoreLinkFunctions {
8 static function register( $parser ) {
9
10
11 }
12
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
22 return false;
23 }
24 return $markers->holders()->makeHolder( $title, isset($displayText) ? $displayText : $titleText, '', '', '' );
25 }
26
27 }