Adds a new hook, ThumbnailBeforeProduceHTML, to ThumbnailImage::toHtml
method, in order to permit the user to manipulate the image and link
attributes before the HTML is rendered. For details see bug 41835
Note: Patch given by Victor <vdanilchenko@vistaprint.net>
Change-Id: Ib94967997e1303522d0081c7387e29af9c0ef0f0
$title: Title of the currently found title obj
$output: OutputPage object
+'ThumbnailBeforeProduceHTML': called before an image HTML is about to be rendered (by ThumbnailImage:toHtml method)
+$thumbnail: the ThumbnailImage object
+&$attribs: image attibute array
+&$linkAttribs: image link attribute array
+
'TitleArrayFromResult': called when creating an TitleArray object from a
database result
&$titleArray: set this to an object to override the default object returned
if ( !empty( $this->responsiveUrls ) ) {
$attribs['srcset'] = Html::srcSet( $this->responsiveUrls );
}
+
+ wfRunHooks( 'ThumbnailBeforeProduceHTML', array( $this, &$attribs, &$linkAttribs ) );
+
return $this->linkWrap( $linkAttribs, Xml::element( 'img', $attribs ) );
}