Manual:Hooks/EditFilterMerged

From MediaWiki.org

Jump to: navigation, search
EditFilterMerged
Available from version 1.12.0
Post-section-merge edit filter

*Define function:
function fnMyHook($editor, $text, $error) { ... }

*Attach hook:
$wgHooks['EditFilterMerged'][] = 'fnMyHook';
Called from: EditPage.php

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


[edit] Details

  • $editor: EditPage instance (object)
  • $text: content of the edit box
  • $error: error message to return

Return false to halt editing; you'll need to handle error messages, etc. yourself. Alternatively, modifying $error and returning true will cause the contents of $error

Personal tools