Manual:Hooks/ArticleInsertComplete
From MediaWiki.org
< Manual:Hooks(Redirected from Manual:MediaWiki hooks/ArticleInsertComplete)
| ArticleInsertComplete | |
|---|---|
| Available from version 1.6.0 Occurs after a new article has been created |
|
*Define function: |
function fnMyHook( &$article, User &$user, $text, $summary, $minoredit, |
*Attach hook: |
$wgHooks['ArticleInsertComplete'][] = 'MyExtensionHooks::someExample'; |
| Called from: | Article.php |
*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:ArticleInsertComplete extensions.
[edit] Details
- $article: the Article or WikiPage (object) saved. Article for MW < 1.18, WikiPage for MW >= 1.18
- $user: the user (object) who saved the article
- $text: the new article content
- $summary: the article summary (comment)
- $minoredit: minor edit flag
- $watchthis: watch the page if
true, unwatch the page iffalse, do nothing ifnull(since 1.17.0) - $sectionanchor: not used as of 1.8 (automatically set to "null")
- $flags: bitfield, see source code for details; passed to Article::doedit()
- $revision: The newly inserted revision object (as of 1.11.0)