< Manual:Hooks 
 
      | 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": "MyExtensionHooks::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
- 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
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.
See also
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.