2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

FEATURE: support registration of custom html by plugins

This commit is contained in:
Sam 2014-06-05 11:39:33 +10:00
parent 8ec9288a5c
commit f1a28d62a3
3 changed files with 18 additions and 4 deletions

View file

@ -108,6 +108,11 @@ class Plugin::Instance
@javascripts << js
end
def register_custom_html(hash)
DiscoursePluginRegistry.custom_html ||= {}
DiscoursePluginRegistry.custom_html.merge!(hash)
end
def register_asset(file, opts=nil)
full_path = File.dirname(path) << "/assets/" << file
assets << [full_path, opts]