mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
Expose an API for plugins to be hidden on the admin plugin page.
This commit is contained in:
parent
086cb0f849
commit
c6f45fcfdb
3 changed files with 13 additions and 1 deletions
|
@ -164,6 +164,14 @@ module Discourse
|
|||
@plugins ||= []
|
||||
end
|
||||
|
||||
def self.hidden_plugins
|
||||
@hidden_plugins ||= []
|
||||
end
|
||||
|
||||
def self.display_plugins
|
||||
self.plugins - self.hidden_plugins
|
||||
end
|
||||
|
||||
def self.plugin_themes
|
||||
@plugin_themes ||= plugins.map(&:themes).flatten
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue