Manual:Hooks/ApiDeprecationHelp

From MediaWiki.org
Jump to navigation Jump to search
ApiDeprecationHelp
Available from version 1.29.0 (Gerrit change 331419)
Add messages to the 'deprecation-help' warning generated from ApiBase::addDeprecation().
Define function:
public static function onApiDeprecationHelp( &$msgs ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ApiDeprecationHelp": "MyExtensionHooks::onApiDeprecationHelp"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ApiDeprecationHelp'][] = 'MyExtensionHooks::onApiDeprecationHelp';
Called from:File(s): api/ApiBase.php
Function(s): addDeprecation

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

Details[edit]

  • &$msgs: Message[] Messages to include in the help. Multiple messages will be joined with spaces.