mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 03:58:06 +08:00
DEV: Remove register_color_scheme
api (#28777)
This was added 10 years ago, but currently there's not a single use in our public and private plugins and no reference in third-party plugins on github
This commit is contained in:
@ -49,7 +49,6 @@ class Plugin::Instance
|
||||
# Memoized array readers
|
||||
%i[
|
||||
assets
|
||||
color_schemes
|
||||
initializers
|
||||
javascripts
|
||||
locales
|
||||
@ -593,12 +592,6 @@ class Plugin::Instance
|
||||
end
|
||||
|
||||
def notify_after_initialize
|
||||
color_schemes.each do |c|
|
||||
unless ColorScheme.where(name: c[:name]).exists?
|
||||
ColorScheme.create_from_base(name: c[:name], colors: c[:colors])
|
||||
end
|
||||
end
|
||||
|
||||
initializers.each do |callback|
|
||||
begin
|
||||
callback.call(self)
|
||||
@ -732,10 +725,6 @@ class Plugin::Instance
|
||||
service_workers << [File.join(File.dirname(path), "assets", file), opts]
|
||||
end
|
||||
|
||||
def register_color_scheme(name, colors)
|
||||
color_schemes << { name: name, colors: colors }
|
||||
end
|
||||
|
||||
def register_seed_data(key, value)
|
||||
seed_data[key] = value
|
||||
end
|
||||
|
Reference in New Issue
Block a user