Jump to content

Manual:Hooks/EditPageBeforeConflictDiff

From mediawiki.org
EditPageBeforeConflictDiff
Available from version 1.13.0
Allows modifying the EditPage object and output when there's an edit conflict.
Define function:
public static function onEditPageBeforeConflictDiff( &$editor, &$out ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"EditPageBeforeConflictDiff": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageBeforeConflictDiff"
	}
}
Called from: File(s): EditPage.php
Interface: EditPageBeforeConflictDiffHook.php

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

Details

[edit]

Return false to halt normal diff output; in this case you're responsible for computing and outputting the entire "conflict" part, i.e., the "difference between revisions" and "your text" headers and sections.

  • &$editor: EditPage instance
  • &$out: OutputPage instance