Manual:Hooks/ParserMakeImageParams
From Linux Web Expert
ParserMakeImageParams | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> Alter the parameters used to generate an image before it is generated | |
<translate> Define function:</translate> | public static function onParserMakeImageParams( $title, $file, &$params, $parser ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"ParserMakeImageParams": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserMakeImageParams"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> Parser.php |
<translate> Interface:</translate> | ParserMakeImageParamsHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ParserMakeImageParams extensions</tvar>.</translate>
Details
- $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.