Manual:Hooks/SetupUserMessageArticle

Category:MediaWiki hooks#SetupUserMessageArticle Category:Hooks added in MediaWiki 1.17.0#SetupUserMessageArticle Category:MediaWiki deprecated or obsolete features#SetupUserMessageArticle Category:Hooks removed in MediaWiki 1.18.0#SetupUserMessageArticle
SetupUserMessageArticle
Available from version 1.17.0
Removed in version 1.18.0Category:Removed hooks#SetupUserMessageArticle
Called in User::leaveUserMessage() before anything has been posted to the article.
Define function:
public static function onSetupUserMessageArticle( $user, &$article, $subject, $text, $signature, $summary, $editor ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"SetupUserMessageArticle": "MediaWiki\\Extension\\MyExtension\\Hooks::onSetupUserMessageArticle"
	}
}
Called from: File(s): User.phpCategory:MediaWiki hooks included in User.php#SetupUserMessageArticle
Interface: SetupUserMessageArticleHook.php

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

Details

  • $user: The user who we left the message for.
  • &$article: The article that will be posted to.
  • $subject: The subject of the message
  • $text: The text of the message.
  • $signature: The signature we used.
  • $summary: The edit summary.
  • $editor: The editor that performed the edit.
Category:Hooks added in MediaWiki 1.17.0 Category:Hooks removed in MediaWiki 1.18.0 Category:MediaWiki deprecated or obsolete features Category:MediaWiki hooks Category:MediaWiki hooks included in User.php Category:Removed hooks