mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
Merge "Account for SkinComponentLink class attribute possibly being an array"
This commit is contained in:
commit
8b6cb95fd7
|
@ -881,7 +881,15 @@ class Hooks implements
|
|||
$veEditSectionHint = $tabMessages['editsectionhint'];
|
||||
|
||||
$attribs = $result['editsection']['attribs'];
|
||||
$attribs['class'] = ( $attribs['class'] ?? '' ) . ' mw-editsection-visualeditor';
|
||||
// class goes to SkinComponentLink which will accept a string or
|
||||
// an array, and either might be provided at this point.
|
||||
$class = $attribs['class'] ?? '';
|
||||
if ( is_array( $class ) ) {
|
||||
$class[] = 'mw-editsection-visualeditor';
|
||||
} else {
|
||||
$class .= ' mw-editsection-visualeditor';
|
||||
}
|
||||
$attribs['class'] = $class;
|
||||
$attribs['title'] = $skin->msg( $veEditSectionHint )
|
||||
->plaintextParams( $tooltip )
|
||||
->inLanguage( $lang )->text();
|
||||
|
|
Loading…
Reference in a new issue