mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 09:57:25 +08:00
DEV: allow the plugin to register valid site setting areas (#29432)
In this PR, we defined the ability to group site settings by area - https://github.com/discourse/discourse/pull/28570 Plugins should be able to register in their own areas.
This commit is contained in:

committed by
GitHub

parent
4529b0614c
commit
0839bce7b6
@ -849,6 +849,14 @@ class Plugin::Instance
|
||||
end
|
||||
end
|
||||
|
||||
# Site setting areas are a way to group site settings below
|
||||
# the setting category level. This is useful for creating focused
|
||||
# config areas that update a small selection of settings, and otherwise
|
||||
# grouping related settings in the UI.
|
||||
def register_site_setting_area(area)
|
||||
DiscoursePluginRegistry.site_setting_areas << area
|
||||
end
|
||||
|
||||
def javascript_includes
|
||||
assets
|
||||
.map do |asset, opts|
|
||||
|
Reference in New Issue
Block a user