mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Allow themes to specify modifiers in their about.json file (#9097)
There are three modifiers: - serialize_topic_excerpts (boolean) - csp_extensions (array of strings) - svg_icons (array of strings) When multiple themes are active, the values will be combined. The combination method varies based on the setting. CSP/SVG arrays will be combined. serialize_topic_excerpts will use `Enumerable#any`.
This commit is contained in:
@@ -111,7 +111,7 @@ class ListableTopicSerializer < BasicTopicSerializer
|
||||
alias :include_new_posts? :has_user_data
|
||||
|
||||
def include_excerpt?
|
||||
pinned || SiteSetting.always_include_topic_excerpts
|
||||
pinned || SiteSetting.always_include_topic_excerpts || ThemeModifierHelper.new(request: scope.request).serialize_topic_excerpts
|
||||
end
|
||||
|
||||
def pinned
|
||||
|
||||
Reference in New Issue
Block a user