< Manual:Hooks 
 
      | ThumbnailBeforeProduceHTML | |
|---|---|
| Available from version 1.21.0 Called before an image HTML is about to be rendered (by ThumbnailImage:toHtml method). | |
| Define function: | public static function onThumbnailBeforeProduceHTML( ThumbnailImage $thumbnail, array &$attribs, array &$linkAttribs ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"ThumbnailBeforeProduceHTML": "MyExtensionHooks::onThumbnailBeforeProduceHTML"
	}
}
 | 
| Called from: | File(s): media/ThumbnailImage.php | 
| Interface: | ThumbnailBeforeProduceHTMLHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ThumbnailBeforeProduceHTML extensions.
Details
- $thumbnail: the ThumbnailImage object
- &$attribs: image attribute array
- &$linkAttribs: image link attribute array
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.