Manual:Hooks/ImportHandleUploadXMLTag

From MediaWiki.org
Jump to navigation Jump to search
ImportHandleUploadXMLTag
Available from version 1.17.0
When parsing a XML tag in a file upload.
Define function:
public static function onImportHandleUploadXMLTag( $importer, $revisionInfo ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ImportHandleUploadXMLTag": "MyExtensionHooks::onImportHandleUploadXMLTag"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ImportHandleUploadXMLTag'][] = 'MyExtensionHooks::onImportHandleUploadXMLTag';
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:ImportHandleUploadXMLTag extensions.

Details[edit]

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

Return false to stop further processing of the tag