Manual:Hooks/BeforeParserrenderImageGallery

From mediawiki.org
Jump to navigation Jump to search
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 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