Manual:Hooks/PreferencesGetIcon
Appearance
PreferencesGetIcon | |
---|---|
Available from version 1.40.0 Use the hook to add an icon that will be displayed in the mobile layout of Special:Preferences. | |
Define function: | public static function onPreferencesGetIcon( array &$iconNames ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"PreferencesGetIcon": "MediaWiki\\Extension\\MyExtension\\Hooks::onPreferencesGetIcon"
}
}
|
Called from: | File(s): specials/forms/PreferencesFormOOUI.php |
Interface: | PreferencesGetIconHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:PreferencesGetIcon extensions.
Details
[edit]- array &$iconNames: A key-value array that assigns an icon name to a section name. The key is the section name, the value is the icon name.
Notes
[edit]This hook allows extensions or skins to add icons to their section in Special:Preferences's mobile layout.
You can obtain the icon names from OOJS-UI's documentation website.