Manual:Hooks/ArticlePurge

ArticlePurge
Available from version 1.6.0
Executes before running "&action=purge"
Define function:
public static function onArticlePurge( &$article ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ArticlePurge": "MediaWiki\\Extension\\MyExtension\\Hooks::onArticlePurge"
	}
}
Called from: File(s): page/WikiPage.php
Interface: ArticlePurgeHook.php

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

Details

edit
  • $article: Article (MW < 1.18) or WikiPage (MW 1.18+) object of the article being purged.

Notes

edit

Can be used to cancel an article purge by returning false.