Manual:Hooks/ArticlePurge

From MediaWiki.org
Jump to: navigation, search
ArticlePurge
Available from version 1.6.0
Executes before running "&action=purge"
Define function:
public static function onArticlePurge( &$article ) { ... }
Attach hook:
$wgHooks['ArticlePurge'][] = 'MyExtensionHooks::onArticlePurge';
Called from: File(s): WikiPage.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.

Broken after r86041.