mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 16:31:09 +08:00
DEV: HTML Builders should respect if a plugin is enabled or not (#8454)
Previously they would return the HTML regardless of whether the plugin was enabled or not.
This commit is contained in:
@ -418,7 +418,10 @@ class Plugin::Instance
|
||||
end
|
||||
|
||||
def register_html_builder(name, &block)
|
||||
DiscoursePluginRegistry.register_html_builder(name, &block)
|
||||
plugin = self
|
||||
DiscoursePluginRegistry.register_html_builder(name) do |*args|
|
||||
block.call(*args) if plugin.enabled?
|
||||
end
|
||||
end
|
||||
|
||||
def register_asset(file, opts = nil)
|
||||
|
Reference in New Issue
Block a user