Available from version 1.17.0
When parsing a XML tag in a page revision.
Define function:
public static function onImportHandlePageXMLTag( $importer, $pageInfo ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"ImportHandlePageXMLTag": "MyExtensionHooks::onImportHandlePageXMLTag"

For MediaWiki ≤1.25:

$wgHooks['ImportHandlePageXMLTag'][] = 'MyExtensionHooks::onImportHandlePageXMLTag';
Called from:File(s): import/WikiImporter.php

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


  • $importer: WikiImporter object
  • $pageInfo: Array of information

Return false to stop further processing of the tag