Manual:Hooks/GetPreferences/fr

Exemple
In :

In :

Onglets et sections
The  array key specifies which tab and section of  contains your preferences. If your  value is foo/bar, this means your preference will appear on the foo tab (named by system message  ) within the bar section (named by system message  ). If no such tab or section exists, it is created automatically.

Types apparents
Le type peut prendre diverses valeurs trouvées dans le tableau  du  fichier, incluant  ,  ,  , etc.

Most preferences are stored in the same format as is used by the HTMLFormField, but in the case of  a transformation should be carried out from a newline-separated list of usernames (which is what the form widget works with) and a newline-separated list of user IDs (which is what gets stored in the database). See the treatment of  (in core) or   (in Echo) for examples of this.

Préférences d'API
Les préférences API utilisent le type 'api'. Elles ne sont pas affichées dans Special:Preferences.

Préférences par défaut
To set the default value for a preference (i.e. the value that is set for a new user that hasn't customized their preferences yet), add the setting to the global variable. Use the same key name as you use for $preferences in the hook.

Par ailleurs, si vous écrivez une extension, vous pouvez ajouter à la section DefaultUserOptions du fichier extensions.json.