Manual:Hooks/PageContentInsertComplete

PageContentInsertComplete
Available from version 1.21.0
Removed in version 1.37.0 (Gerrit change 678414)
Occurs after a new article is created
Define function:
public static function onPageContentInsertComplete( &$wikiPage, User &$user, $content, $summary, $isMinor, $isWatch, $section, &$flags, Revision $revision ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"PageContentInsertComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onPageContentInsertComplete"
	}
}
Called from: File(s): Storage/PageUpdater.php
Interface: PageContentInsertCompleteHook.php

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


  • $wikiPage: WikiPage created
  • $user: User creating the article
  • $content: New content as a Content object
  • $summary: Edit summary/comment
  • $isMinor: Whether or not the edit was marked as minor (new pages can not currently be marked as minor)
  • $isWatch: (No longer used)
  • $section: (No longer used)
  • $flags: Flags passed to WikiPage::doEditContent()
  • $revision: New Revision of the article