Revert "DEV: add a plugin modifier to change hidden site settings (#24104)" (#24117)

This reverts commit ddcee84e455e2895c93b4bc9a24c7c1da9779608.
This commit is contained in:
Neil Lalonde
2023-10-26 15:56:08 -04:00
committed by GitHub
parent ddcee84e45
commit bd7cea7dd7
3 changed files with 3 additions and 50 deletions

View File

@ -91,12 +91,8 @@ module SiteSettingExtension
@shadowed_settings ||= []
end
def hidden_settings_provider
@hidden_settings_provider ||= SiteSettings::HiddenProvider.new
end
def hidden_settings
hidden_settings_provider.all
@hidden_settings ||= []
end
def refresh_settings
@ -588,14 +584,14 @@ module SiteSettingExtension
categories[name] = opts[:category] || :uncategorized
hidden_settings_provider.add_hidden(name) if opts[:hidden]
hidden_settings << name if opts[:hidden]
if GlobalSetting.respond_to?(name)
val = GlobalSetting.public_send(name)
unless val.nil? || (val == "")
shadowed_val = val
hidden_settings_provider.add_hidden(name)
hidden_settings << name
shadowed_settings << name
end
end