Manual:Hooks/ParserModifyImageHTML
From Linux Web Expert
ParserModifyImageHTML | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 743061)</tvar></translate> This hook is called for each image added to parser output, with its associated HTML as returned from Linker::makeImageLink(). | |
<translate> Define function:</translate> | public static function onParserModifyImageHTML( Parser $parser, File $file, array $params, string &$html ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"ParserModifyImageHTML": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserModifyImageHTML"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> parser/Parser.php <translate> Function(s):</translate> onParserModifyImageHTML |
<translate> Interface:</translate> | ParserModifyImageHTMLHook.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:ParserModifyImageHTML extensions</tvar>.</translate>