< Manual:Hooks
| ArticleProtect | |
|---|---|
| Available from version 1.4.0 Occurs whenever the software receives a request to protect an article | |
| Define function: | public static function onArticleProtect( &$wikiPage, &$user, $protect, $reason, $moveonly ) { ... }
|
| Attach hook: | In extension.json:
{
"Hooks": {
"ArticleProtect": "MyExtensionHooks::onArticleProtect"
}
}
|
| Called from: | File(s): page/WikiPage.php |
| Interface: | ArticleProtectHook.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ArticleProtect extensions.
Details
- $wikiPage: (object) the wikipage being protected
- $user: (object) the user doing the protection
- $protect*: boolean flag indicating whether the request is protect or unprotect
- $reason: (string) Reason for protect
- $moveonly: (boolean) flag indicating whether this is for move only or not
See also
- ArticleProtectComplete
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.