Manual:Hooks/BeforeParserFetchFileAndTitle

From MediaWiki.org
Jump to: navigation, search
BeforeParserFetchFileAndTitle
Available from version 1.18.0 (r84659)
Before an image is rendered by Parser.
Define function:
public static function onBeforeParserFetchFileAndTitle( $parser, $nt, &$options, &$descQuery ) { ... }
Attach hook:
$wgHooks['BeforeParserFetchFileAndTitle'][] = 'MyExtensionHooks::onBeforeParserFetchFileAndTitle';
Called from: File(s): Parser.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: image options separated by pipes, like left|border|300px|link=Main page
  • &$descQuery: query string to add to thumbnail URL