$res = null;
$dummy = new DummyLinker;
if ( !Hooks::run( 'ImageBeforeProduceHTML', [ &$dummy, &$title,
- &$file, &$frameParams, &$handlerParams, &$time, &$res ] ) ) {
+ &$file, &$frameParams, &$handlerParams, &$time, &$res,
+ $parser, &$query, &$widthOption
+ ] ) ) {
return $res;
}
* red if the user has no edits?
* @param int $flags Customisation flags (e.g. Linker::TOOL_LINKS_NOBLOCK
* and Linker::TOOL_LINKS_EMAIL).
- * @param int $edits User edit count (optional, for performance)
+ * @param int|null $edits User edit count (optional, for performance)
* @return string HTML fragment
*/
public static function userToolLinks(
* @since 1.16.3
* @param int $userId User identifier
* @param string $userText User name or IP address
- * @param int $edits User edit count (optional, for performance)
+ * @param int|null $edits User edit count (optional, for performance)
* @return string
*/
public static function userToolLinksRedContribs( $userId, $userText, $edits = null ) {
* @return string
*/
public static function tocIndent() {
- return "\n<ul>";
+ return "\n<ul>\n";
}
/**
$classes .= " tocsection-$sectionIndex";
}
- // \n<li class="$classes"><a href="#$anchor"><span class="tocnumber">
+ // <li class="$classes"><a href="#$anchor"><span class="tocnumber">
// $tocnumber</span> <span class="toctext">$tocline</span></a>
- return "\n" . Html::openElement( 'li', [ 'class' => $classes ] )
+ return Html::openElement( 'li', [ 'class' => $classes ] )
. Html::rawElement( 'a',
[ 'href' => "#$anchor" ],
Html::element( 'span', [ 'class' => 'tocnumber' ], $tocnumber )
$title = wfMessage( 'toc' )->inLanguage( $lang )->escaped();
return '<div id="toc" class="toc">'
+ . Html::element( 'input', [
+ 'type' => 'checkbox',
+ 'role' => 'button',
+ 'id' => 'toctogglecheckbox',
+ 'class' => 'toctogglecheckbox',
+ 'style' => 'display:none',
+ ] )
. Html::openElement( 'div', [
'class' => 'toctitle',
'lang' => $lang->getHtmlCode(),
'dir' => $lang->getDir(),
] )
- . '<h2>' . $title . "</h2></div>\n"
+ . "<h2>$title</h2>"
+ . '<span class="toctogglespan">'
+ . Html::label( '', 'toctogglecheckbox', [
+ 'class' => 'toctogglelabel',
+ ] )
+ . '</span>'
+ . "</div>\n"
. $toc
. "</ul>\n</div>\n";
}
* @since 1.16.3. $context added in 1.20. $options added in 1.21
*
* @param Revision $rev
- * @param IContextSource $context Context to use or null for the main context.
+ * @param IContextSource|null $context Context to use or null for the main context.
* @param array $options
* @return string
*/