Jump to content

Manual:Hooks/WatchArticleComplete

From mediawiki.org
WatchArticleComplete
Available from version 1.4.0
Occurs after the watch article request has been processed
Define function:
public static function onWatchArticleComplete( $user, $article ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"WatchArticleComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onWatchArticleComplete"
	}
}
Called from: File(s): page/Article.php
Interface: WatchArticleCompleteHook.php

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


Details

[edit]
  • $user: user that watched
  • $article: article object watched

See also

[edit]