Manual:Hooks/APIGetDescription

From MediaWiki.org
Jump to navigation Jump to search
APIGetDescription
Available from version 1.19.0
Use this hook to modify a module's descriptions
Define function:
public static function onAPIGetDescription( &$module, &$desc ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"APIGetDescription": "MyExtensionHooks::onAPIGetDescription"
	}
}

For MediaWiki ≤1.25:

$wgHooks['APIGetDescription'][] = 'MyExtensionHooks::onAPIGetDescription';
Called from:File(s): ApiBase.php

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

Details[edit]

  • $module: ApiBase Module object
  • $desc: Array of descriptions