mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add Plugin API to register a category custom field.
This commit is contained in:
@@ -248,6 +248,12 @@ class Plugin::Instance
|
||||
end
|
||||
end
|
||||
|
||||
def register_category_custom_field_type(name, type)
|
||||
reloadable_patch do |plugin|
|
||||
Category.register_custom_field_type(name, type) if plugin.enabled?
|
||||
end
|
||||
end
|
||||
|
||||
def register_topic_custom_field_type(name, type)
|
||||
reloadable_patch do |plugin|
|
||||
::Topic.register_custom_field_type(name, type) if plugin.enabled?
|
||||
|
||||
Reference in New Issue
Block a user