Merge "Allow extensions and skins to define a globalizable custom field"

这个提交包含在:
jenkins-bot 2023-10-04 06:01:29 +00:00 提交者 Gerrit Code Review
当前提交 644482c799

查看文件

@ -450,6 +450,13 @@ class GlobalPreferencesFactory extends DefaultPreferencesFactory {
return false;
}
// Allow explicitly define if a preference can be globalized,
// especially useful for custom field classes.
// TODO: Deprecate 'noglobal' in favour of this param.
if ( isset( $info['canglobal'] ) ) {
return (bool)$info['canglobal'];
}
$isAllowedType = isset( $info['type'] )
&& !in_array( $info['type'], $this->typesPrevented )
&& !in_array( $name, $this->disallowedPreferences );