Jump to content

Manual:Hooks/SpecialVersionVersionUrl

From mediawiki.org
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": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialVersionVersionUrl"
	}
}
Called from: File(s): specials/SpecialVersion.php
Function(s): getwgVersionLinked
Interface: SpecialVersionVersionUrlHook.php

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)