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": "MyExtensionHooks::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.

DetailsEdit

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

NotesEdit

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