Jump to content

Manual:Hooks/PageSaveComplete

From mediawiki.org
PageSaveComplete
Available from version 1.35.0 (Gerrit change 601099)
After an article has been updated.
Define function:
public static function onPageSaveComplete( WikiPage $wikiPage, MediaWiki\User\UserIdentity $user, string $summary, int $flags, MediaWiki\Revision\RevisionRecord $revisionRecord, MediaWiki\Storage\EditResult $editResult ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"PageSaveComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onPageSaveComplete"
	}
}
Called from: File(s): Storage/PageUpdater.php
Interface: PageSaveCompleteHook.php

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


Details

[edit]
  • $wikiPage: WikiPage that was modified
  • $user: user performing the modification
  • $summary: edit summary/comment
  • $flags: EDIT_… flags passed to WikiPage::doEditContent()
  • $revisionRecord: new MediaWiki\Revision\RevisionRecord of the article
  • $editResult: object storing information about the effects of this edit, including which edits were reverted and which edit is this based on (for reverts and null edits). See also $wgManualRevertSearchRadius.
  • Return value: return false to stop other hook handlers from being called; save cannot be aborted.

See also

[edit]
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy