Manual:Hooks/SpecialVersionVersionUrl

From MediaWiki.org
Jump to navigation Jump to search
SpecialVersionVersionUrl
Available from version 1.21.0 (Gerrit change 35917)
Called when building the URL for Special:Version.
Define function:
public static function onSpecialVersionVersionUrl( string $version, string &$versionUrl ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"SpecialVersionVersionUrl": "MyExtensionHooks::onSpecialVersionVersionUrl"
	}
}

For MediaWiki ≤1.25:

$wgHooks['SpecialVersionVersionUrl'][] = 'MyExtensionHooks::onSpecialVersionVersionUrl';
Called from:File(s): specials/SpecialVersion.php
Function(s): getwgVersionLinked

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

Details[edit]

  • $version: Current $wgVersion for you to use
  • &$versionUrl: Raw url to link to (eg: release notes)