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, &$time, &$sha1, &$descQuery ) { ... }

Attach hook:
$wgHooks['BeforeParserFetchFileAndTitle'][] = 'MyExtensionHooks::onBeforeParserFetchFileAndTitle';
Called from: Parser.php

For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:BeforeParserFetchFileAndTitle extensions.


[edit] Details

  • $parser: Parser object
  • $nt: the image title
  • &$time: the image timestamp (use '0' to force a broken thumbnail)
  • &$sha1: image base 36 sha1 (used to specify the file, $nt will be ignored if this is set)
  • &$descQuery: query string to add to thumbnail URL
Language: English  • Bahasa Indonesia • 日本語
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox