Manual:Hooks/APIGetParamDescriptionMessages

From MediaWiki.org
Jump to navigation Jump to search
APIGetParamDescriptionMessages
Available from version 1.25.0 (Gerrit change 160798)
Allows to modify a module's parameter descriptions
Define function:
public static function onAPIGetParamDescriptionMessages( ApiBase $module, array &$messages ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"APIGetParamDescriptionMessages": "MyExtensionHooks::onAPIGetParamDescriptionMessages"
	}
}

For MediaWiki ≤1.25:

$wgHooks['APIGetParamDescriptionMessages'][] = 'MyExtensionHooks::onAPIGetParamDescriptionMessages';
Called from:File(s): api/ApiBase.php
Function(s): getFinalParamDescription

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

Details[edit]

  • $module - ApiBase object
  • &$messages - Array of Message objects