手册:钩子/AutopromoteCondition
AutopromoteCondition | |
---|---|
自version 1.12.0 版可用 check autopromote condition for user. | |
定义函数: | public static function onAutopromoteCondition( $type, $args, $user, &$result ) { ... }
|
附加钩子: | 在extension.json中:
{
"Hooks": {
"AutopromoteCondition": "MediaWiki\\Extension\\MyExtension\\Hooks::onAutopromoteCondition"
}
}
|
调用自: | 文件: Autopromote.php |
介面: | AutopromoteConditionHook.php |
更多有关附加钩子的信息,请参见Manual:Hooks 。
有关使用此钩子的扩展示例,请参见Category:AutopromoteCondition extensions/zh。
细节
This hook only runs if the condition type does not match any of those already defined as possible conditions.
If you are writing an extension that declares a constant for a new condition type, note that values 0 through 9 have already been taken by APCOND_EDITCOUNT
, APCOND_AGE
, etc.