Jump to content

Manual:Hooks/PreferencesGetIcon

From mediawiki.org
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.

See also

[edit]
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy