Open main menu

Manual:Hooks/WatchArticleComplete

< Manual:Hooks
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": "MyExtensionHooks::onWatchArticleComplete"
	}
}

For MediaWiki ≤1.25:

$wgHooks['WatchArticleComplete'][] = 'MyExtensionHooks::onWatchArticleComplete';
Called from:File(s): Article.php

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

DetailsEdit

  • $user: user that watched
  • $article: article object watched

See alsoEdit