Manual:Hooks/ParserMakeImageParams
Appearance
ParserMakeImageParams | |
---|---|
Available from version 1.12.0 Alter the parameters used to generate an image before it is generated | |
Define function: | public static function onParserMakeImageParams( $title, $file, &$params, $parser ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"ParserMakeImageParams": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserMakeImageParams"
}
}
|
Called from: | File(s): Parser.php |
Interface: | ParserMakeImageParamsHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ParserMakeImageParams extensions.
Details
[edit]- $title: The title of the image
- $file: The file name of the image
- $params: The parameters used to generate the image (i.e. thumbnail, center, framed). See Parser.php for a complete list.
- $parser: Parser that called the hook. Available since MediaWiki 1.20.