Manual:Hooks/BeforeParserrenderImageGallery

BeforeParserrenderImageGallery
Available from version 1.10.1
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": "MyExtensionHooks::onBeforeParserrenderImageGallery"
	}
}
Called from:File(s): parser/Parser.php
Interface:BeforeParserrenderImageGalleryHook.php

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

DetailsEdit

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