mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-14 11:15:33 +00:00
Merge "Add support for icons not prefixed with wikimedia-
."
This commit is contained in:
commit
61e2e0fbd8
|
@ -203,7 +203,13 @@ class Hooks {
|
||||||
*/
|
*/
|
||||||
private static function addIconToListItem( &$item, $icon_name ) {
|
private static function addIconToListItem( &$item, $icon_name ) {
|
||||||
// Set the default menu icon classes.
|
// Set the default menu icon classes.
|
||||||
$menu_icon_classes = [ 'mw-ui-icon', 'mw-ui-icon-before', 'mw-ui-icon-wikimedia-' . $icon_name ];
|
$menu_icon_classes = [ 'mw-ui-icon', 'mw-ui-icon-before',
|
||||||
|
// Some extensions declare icons without the wikimedia- prefix. e.g. Echo
|
||||||
|
'mw-ui-icon-' . $icon_name,
|
||||||
|
// FIXME: Some icon names are prefixed with `wikimedia-`.
|
||||||
|
// We should seek to remove all these instances.
|
||||||
|
'mw-ui-icon-wikimedia-' . $icon_name
|
||||||
|
];
|
||||||
self::addListItemClass( $item, $menu_icon_classes, true );
|
self::addListItemClass( $item, $menu_icon_classes, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,7 +345,10 @@ class Hooks {
|
||||||
|
|
||||||
if ( $icon ) {
|
if ( $icon ) {
|
||||||
if ( $hideText ) {
|
if ( $hideText ) {
|
||||||
$item['link-class'][] = 'mw-ui-icon mw-ui-icon-element mw-ui-icon-wikimedia-' . $icon;
|
$item['link-class'][] = 'mw-ui-icon mw-ui-icon-element'
|
||||||
|
. ' mw-ui-icon-wikimedia-' . $icon
|
||||||
|
// Some extensions declare icons without the wikimedia- prefix. e.g. Echo
|
||||||
|
. ' mw-ui-icon-' . $icon;
|
||||||
} else {
|
} else {
|
||||||
$item['link-html'] = self::makeIcon( $icon );
|
$item['link-html'] = self::makeIcon( $icon );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue