Available from version 1.32.0 (Gerrit change 340768)
Called when preparing the OutputPage object for ApiParse. This is mainly intended for calling OutputPage::addContentOverride() or OutputPage::addContentOverrideCallback().
Define function:
public static function onApiParseMakeOutputPage( ApiBase $module, OutputPage $output ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"ApiParseMakeOutputPage": "MyExtensionHooks::onApiParseMakeOutputPage"

For MediaWiki ≤1.25:

$wgHooks['ApiParseMakeOutputPage'][] = 'MyExtensionHooks::onApiParseMakeOutputPage';
Called from:File(s): api/ApiParse.php
Function(s): execute

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


  • $module: ApiBase (which is also a ContextSource)
  • $output: OutputPage