Manual:Hooks/UserGetDefaultOptions
UserGetDefaultOptions | |
---|---|
Available from version 1.18.0 (r97365, codereview) Called after fetching the core default user options. | |
Define function: | public static function onUserGetDefaultOptions( &$defaultOptions ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"UserGetDefaultOptions": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserGetDefaultOptions"
}
}
|
Called from: | File(s): User.php |
Interface: | UserGetDefaultOptionsHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:UserGetDefaultOptions extensions.
Details
editThis hook is run just before returning the options to the caller.
- &$defaultOptions: Array of preference keys and their default values.