+ * Display an error if the plugin is active a no color is configured.
+ *
+ * @param $conf ConfigManager instance
+ *
+ * @return array|null The errors array or null of there is none.
+ */
+function default_colors_init($conf)
+{
+ $params = '';
+ foreach (DEFAULT_COLORS_PLACEHOLDERS as $placeholder) {
+ $params .= trim($conf->get('plugins.'. $placeholder, ''));
+ }
+
+ if (empty($params)) {
+ $error = t('Default colors plugin error: '.
+ 'This plugin is active and no custom color is configured.');
+ return array($error);
+ }
+}
+
+/**
+ * When plugin parameters are saved, we regenerate the custom CSS file with provided settings.
+ *
+ * @param array $data $_POST array
+ *
+ * @return array Updated $_POST array