Manual:Hooks/ImportSources

Category:MediaWiki hooks#ImportSources Category:Hooks added in MediaWiki 1.27.0#ImportSources
ImportSources
Available from version 1.27.0 (Gerrit change 230996)
Called when reading from the $wgImportSources configuration variable
Define function:
public static function onImportSources( array &$importSources ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ImportSources": "MediaWiki\\Extension\\MyExtension\\Hooks::onImportSources"
	}
}
Called from: File(s): api/ApiImport.phpCategory:MediaWiki hooks included in ApiImport.php#ImportSources, specials/SpecialImport.phpCategory:MediaWiki hooks included in SpecialImport.php#ImportSources
Function(s): getAllowedImportSources, execute
Interface: ImportSourcesHook.php

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

Can be used to lazy-load the import sources list.

Details

Category:Hooks added in MediaWiki 1.27.0 Category:MediaWiki hooks Category:MediaWiki hooks included in ApiImport.php Category:MediaWiki hooks included in SpecialImport.php