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": "MediaWiki\\Extension\\MyExtension\\Hooks::onArticleProtectComplete"
	}
}
Called from: File(s): page/WikiPage.php
Interface: ArticleProtectCompleteHook.php

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

Details

edit
  • $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 also

edit