< Manual:Hooks
AfterParserFetchFileAndTitle
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": "MyExtensionHooks::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

  • $parser - The Parser object
  • $imageGallery - the gallery object (an ImageGalleryBase subclass)
  • &$html - the HTML code of the gallery
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.