Available from version 1.10.1
Removed in version 1.40.0 (Gerrit change 860937)
Allows an extension to modify an image gallery before it is rendered.
Define function:
public static function onBeforeParserrenderImageGallery( Parser $parser, $imageGallery ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"BeforeParserrenderImageGallery": "MediaWiki\\Extension\\MyExtension\\Hooks::onBeforeParserrenderImageGallery"
Called from: File(s): parser/Parser.php
Interface: BeforeParserrenderImageGalleryHook.php

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

Details edit

  • $parser - The parser object
  • $imageGallery - The gallery that is about to be rendered