mirror of
https://github.com/discourse/discourse.git
synced 2024-12-14 13:33:41 +08:00
DEV: plugin API to register User custom field types
This commit is contained in:
parent
24fc0aba9b
commit
39a427efce
|
@ -373,6 +373,13 @@ class Plugin::Instance
|
|||
end
|
||||
end
|
||||
|
||||
# Applies to all sites in a multisite environment. Ignores plugin.enabled?
|
||||
def register_user_custom_field_type(name, type)
|
||||
reloadable_patch do |plugin|
|
||||
::User.register_custom_field_type(name, type)
|
||||
end
|
||||
end
|
||||
|
||||
def register_seedfu_fixtures(paths)
|
||||
paths = [paths] if !paths.kind_of?(Array)
|
||||
SeedFu.fixture_paths.concat(paths)
|
||||
|
|
Loading…
Reference in New Issue
Block a user