mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 11:48:08 +08:00
FEATURE: theme_modifiers can depend on theme settings (plus serialize_post_user_badges) (#29227)
Theme modifiers can now be defined as theme settings, this allows for site operators to override behavior of theme modifiers. New syntax is: ``` { ... "modifiers": { "modifier_name": { "type": "setting", "value": "setting_name" } } } ``` This also introduces a new theme modifier for serialize_post_user_badges. Name of badge must match the name of the badge in the badges table. The client-side is updated to load this new data from the post-stream serializer. Co-authored-by: David Taylor <david@taylorhq.com>
This commit is contained in:
@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
class AddPostBadgesToThemeModifiers < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_column :theme_modifier_sets, :serialize_post_user_badges, :string, array: true
|
||||
add_column :theme_modifier_sets, :theme_setting_modifiers, :jsonb
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user