Manual:Hooks/UnwatchArticle
From Linux Web Expert
UnwatchArticle | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Occurs whenever the software receives a request to unwatch an article | |
<translate> Define function:</translate> | public static function onUnwatchArticle( $user, $article, &$status ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"UnwatchArticle": "MediaWiki\\Extension\\MyExtension\\Hooks::onUnwatchArticle"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> page/Article.php |
<translate> Interface:</translate> | UnwatchArticleHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:UnwatchArticle extensions</tvar>.</translate>
Details
- $user: user watching
- $page: WikiPage object to be removed
- &$status: Status object to be returned if the hook returns false