Manual:Hooks/GetLocalURL::Internal

From MediaWiki.org
Jump to: navigation, search
GetLocalURL::Internal
Available from version 1.19.0 (r94373)
Allows to modify local URLs to internal pages.

Define function:
public static function onGetLocalURL::Internal( $title, &$url, $query ) { ... }

Attach hook:
$wgHooks['GetLocalURL::Internal'][] = 'MyExtensionHooks::onGetLocalURL::Internal';
Called from: Title.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:GetLocalURL::Internal extensions.


Details [edit]

  • $title: Title object of page
  • &$url: string value as output (out parameter, can modify)
  • $query: query options passed to Title::getLocalURL()
  • $variant: variant passed to Title::getLocalURL()