Extension:Thumbro/Hooks/ThumbroBeforeProduceHtml
ThumbroBeforeProduceHtml | |
---|---|
Available from version 0.1.0 Before a thumbnail is produced, gives extension the possibility to add/remove the <source> tags. |
|
Define function: | public static function onThumbroBeforeProduceHtml( $thumbnail, &$sources ) { ... }
|
Attach hook: | $wgHooks['ThumbroBeforeProduceHtml'][] = 'MyExtensionHooks::onThumbroBeforeProduceHtml';
|
Called from: | File(s): Thumbro / includes/Hooks/ThumbroBeforeProduceHtmlHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:ThumbroBeforeProduceHtml extensions.
Details
edit- $thumbnail: ThumbroThumbnailImage (ThumbnailImage)
- &$sources: Array with parameters for
<source>
element- type - Corresponds to the
type
attribute in the<source>
element - sizes - Corresponds to the
sizes
attribute in the<source>
element - media - Corresponds to the
media
attribute in the<source>
element - width - Corresponds to the
width
attribute in the<source>
element - height - Corresponds to the
height
attribute in the<source>
element
- type - Corresponds to the