Manual:Hooks/ExtractThumbParameters

From MediaWiki.org
Jump to navigation Jump to search
ExtractThumbParameters
Available from version 1.19.0
Removed in version 1.30.0
Called when extracting thumbnail parameters from a thumbnail file name.
Define function:
public static function onExtractThumbParameters( $thumbname, &$params ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ExtractThumbParameters": "MyExtensionHooks::onExtractThumbParameters"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ExtractThumbParameters'][] = 'MyExtensionHooks::onExtractThumbParameters';
Called from:File(s): thumb.php
Function(s): wfExtractThumbParams

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

Details[edit]

  • $thumbname: the base name of the thumbnail file
  • &$params: the currently extracted params (has source name, temp or archived zone)