Manual:Hooks/BeforeParserFetchFileAndTitle
BeforeParserFetchFileAndTitle | |
---|---|
Available from version 1.18.0 (r84659, codereview) Before an image is rendered by Parser. | |
Define function: | public static function onBeforeParserFetchFileAndTitle( Parser $parser, $nt, array &$options, string &$descQuery ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"BeforeParserFetchFileAndTitle": "MediaWiki\\Extension\\MyExtension\\Hooks::onBeforeParserFetchFileAndTitle"
}
}
|
Called from: | File(s): parser/Parser.php |
Interface: | BeforeParserFetchFileAndTitleHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:BeforeParserFetchFileAndTitle extensions.
Details
edit- $parser: Parser object
- $nt: the image title
- &$options: array of options to use to Parser::fetchFileAndTitle
- &$descQuery: query string to add to thumbnail URL