Open main menu

Manual:Hooks/ArticleProtectComplete

ArticleProtectComplete
Available from version 1.4.0
Occurs after the protect article request has been processed
Define function:
public static function onArticleProtectComplete( &$wikiPage, &$user, $limit, $reason ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ArticleProtectComplete": "MyExtensionHooks::onArticleProtectComplete"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ArticleProtectComplete'][] = 'MyExtensionHooks::onArticleProtectComplete';
Called from:File(s): page/WikiPage.php

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

DetailsEdit

  • $wikiPage: the WikiPage object that was protected
  • $user: the user object who did the protection
  • $limit: array of page restrictions indexed by permission (e.g. ["edit"=>"sysop", "move"=>"sysop"])
  • $reason: Reason for protect

See alsoEdit