Manual:Hooks/ParserLimitReport

Category:MediaWiki hooks#ParserLimitReport Category:Hooks added in MediaWiki 1.12.0#ParserLimitReport Category:MediaWiki deprecated or obsolete features#ParserLimitReport Category:Hooks removed in MediaWiki 1.32.0#ParserLimitReport Category:Hooks deprecated in MediaWiki 1.22.0#ParserLimitReport
ParserLimitReport
Available from version 1.12.0
Removed in version 1.32.0 (Gerrit change 465792)Category:Removed hooks#ParserLimitReport
called at the end of Parser::parse() when the parser will add a report about size and complexity of the text parsed as a HTML comment
Define function:
public static function onParserLimitReport( $parser, $limitReport ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ParserLimitReport": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserLimitReport"
	}
}
Called from: File(s): Parser.phpCategory:MediaWiki hooks included in Parser.php#ParserLimitReport
Function(s): makeLimitReport
Interface: ParserLimitReportHook.php

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

Details

Used to create the NewPP parser report. Parameters:

  • $parser: Parser object
  • $limitReport: text that will be included (without comment tags); extensions are expected to append their own lines.

Hints

When adding some limts to a page and show that limit in the limit report, you should also add a limitation warning (Parser::limitationWarn) with a tracking category to get all pages, which reach that limit.

Category:Hooks added in MediaWiki 1.12.0 Category:Hooks deprecated in MediaWiki 1.22.0 Category:Hooks removed in MediaWiki 1.32.0 Category:MediaWiki deprecated or obsolete features Category:MediaWiki hooks Category:MediaWiki hooks included in Parser.php Category:Removed hooks