From 035a002edc7376a961e5621dc1039b082637fbc6 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 29 Dec 2020 11:59:14 +0100 Subject: Fix default_colors plugin: update CSS file on color change Last update of this plugin remove the save_plugin_parameters hook. Fixes #1657 --- plugins/default_colors/default_colors.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'plugins/default_colors') diff --git a/plugins/default_colors/default_colors.php b/plugins/default_colors/default_colors.php index 574a0bd4..d3e1fa76 100644 --- a/plugins/default_colors/default_colors.php +++ b/plugins/default_colors/default_colors.php @@ -46,6 +46,20 @@ function default_colors_init($conf) } } +/** + * When plugin parameters are saved, we regenerate the custom CSS file with provided settings. + * + * @param array $data $_POST array + * + * @return array Updated $_POST array + */ +function hook_default_colors_save_plugin_parameters($data) +{ + default_colors_generate_css_file($data); + + return $data; +} + /** * When linklist is displayed, include default_colors CSS file. * -- cgit v1.2.3