Manual:Hooks/UserResetAllOptions/ja

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
UserResetAllOptions
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 144689)</tvar></translate>
<translate> Removed in <tvar name=1><translate> version <tvar (Gerrit change 723014)</tvar></translate>
Allows changing the behavior when a user's preferences are reset. For instance, certain preferences can be preserved.
<translate> Define function:</translate>
public static function onUserResetAllOptions( User $user, array &$newOptions, array $oldOptions, $resetKinds ] ); ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"UserResetAllOptions": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserResetAllOptions"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> User.php
<translate> Function(s):</translate> User::resetOptions
<translate> Interface:</translate> UserResetAllOptionsHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:フック </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:UserResetAllOptions extensions/ja</tvar>.</translate>

詳細

  • User $user: User whose preferences are being reset.
  • array &$newOptions: New preferences as associative array.
  • array $oldOptions: Old preferences as associative array.
  • array|string resetKinds: Kinds of preferences to reset as an array or string; see User::resetOptions for possible values.