Jump to content

Manual:Hooks/ApiDeprecationHelp

From mediawiki.org
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": "MediaWiki\\Extension\\MyExtension\\Hooks::onApiDeprecationHelp"
	}
}
Called from: File(s): api/ApiBase.php
Function(s): addDeprecation
Interface: ApiDeprecationHelpHook.php

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.