Jump to content
MediaWiki

Manual:Hooks/ArticleInsertComplete

From mediawiki.org
This feature was removed from MediaWiki core in version 1.29.0 (after being deprecated in 1.21.0). Please see PageSaveComplete for an alternative way to use this feature.
ArticleInsertComplete
Available from version 1.6.0
Removed in version 1.29.0
Occurs after a new article has been created
Define function:
public static function onArticleInsertComplete( &$article, User &$user, $text, $summary, $minoredit, $watchthis, $sectionanchor, &$flags, Revision $revision ) { ... }
Attach hook: In extension.json:
{
"Hooks":{
"ArticleInsertComplete":"MediaWiki\\Extension\\MyExtension\\Hooks::onArticleInsertComplete"
}
}
Called from: File(s): Article.php
Interface: ArticleInsertCompleteHook.php

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

Details

[edit ]
  • $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 if false, do nothing if null (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)

See also

[edit ]

AltStyle によって変換されたページ (->オリジナル) /