< Manual:Hooks
WatchArticle | |
---|---|
Available from version 1.4.0 Occurs whenever the software receives a request to watch an article | |
Define function: | public static function onWatchArticle( $user, $article, &$status ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"WatchArticle": "MyExtensionHooks::onWatchArticle"
}
}
|
Called from: | File(s): page/Article.php |
Interface: | WatchArticleHook.php |
For more information about attaching hooks, see Manual:Hooks
For examples of extensions using this hook, see Category:WatchArticle extensions.
Details
- $user: user that will watch
- $page: WikiPage object to be watched
- &$status: Status object to be returned if the hook returns false
See also
- WatchArticleComplete
- UnwatchArticle
- UnwatchArticleComplete
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.