Available from version 1.24.0 (Gerrit change 140256)
Alter the HTML code of an image gallery. Called after an image gallery is formed by Parser, just before adding its HTML to parser output.
Define function:
public static function onAfterParserFetchFileAndTitle( $parser, $imageGallery, &$html ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"AfterParserFetchFileAndTitle": "MediaWiki\\Extension\\MyExtension\\Hooks::onAfterParserFetchFileAndTitle"
Called from: File(s): parser/Parser.php
Function(s): renderImageGallery
Interface: AfterParserFetchFileAndTitleHook.php

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

Details edit

  • $parser - The Parser object
  • $imageGallery - the gallery object (an ImageGalleryBase subclass)
  • &$html - the HTML code of the gallery