aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/default_colors/default_colors.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/default_colors/default_colors.php')
-rw-r--r--plugins/default_colors/default_colors.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/default_colors/default_colors.php b/plugins/default_colors/default_colors.php
index e1fd5cfb..574a0bd4 100644
--- a/plugins/default_colors/default_colors.php
+++ b/plugins/default_colors/default_colors.php
@@ -28,14 +28,14 @@ function default_colors_init($conf)
28{ 28{
29 $params = []; 29 $params = [];
30 foreach (DEFAULT_COLORS_PLACEHOLDERS as $placeholder) { 30 foreach (DEFAULT_COLORS_PLACEHOLDERS as $placeholder) {
31 $value = trim($conf->get('plugins.'. $placeholder, '')); 31 $value = trim($conf->get('plugins.' . $placeholder, ''));
32 if (strlen($value) > 0) { 32 if (strlen($value) > 0) {
33 $params[$placeholder] = $value; 33 $params[$placeholder] = $value;
34 } 34 }
35 } 35 }
36 36
37 if (empty($params)) { 37 if (empty($params)) {
38 $error = t('Default colors plugin error: '. 38 $error = t('Default colors plugin error: ' .
39 'This plugin is active and no custom color is configured.'); 39 'This plugin is active and no custom color is configured.');
40 return [$error]; 40 return [$error];
41 } 41 }
@@ -56,7 +56,7 @@ function default_colors_init($conf)
56function hook_default_colors_render_includes($data) 56function hook_default_colors_render_includes($data)
57{ 57{
58 $file = PluginManager::$PLUGINS_PATH . '/default_colors/default_colors.css'; 58 $file = PluginManager::$PLUGINS_PATH . '/default_colors/default_colors.css';
59 if (file_exists($file )) { 59 if (file_exists($file)) {
60 $data['css_files'][] = $file ; 60 $data['css_files'][] = $file ;
61 } 61 }
62 62
@@ -75,7 +75,7 @@ function default_colors_generate_css_file($params): void
75 $content = ''; 75 $content = '';
76 foreach (DEFAULT_COLORS_PLACEHOLDERS as $rule) { 76 foreach (DEFAULT_COLORS_PLACEHOLDERS as $rule) {
77 $content .= !empty($params[$rule]) 77 $content .= !empty($params[$rule])
78 ? default_colors_format_css_rule($params, $rule) .';'. PHP_EOL 78 ? default_colors_format_css_rule($params, $rule) . ';' . PHP_EOL
79 : ''; 79 : '';
80 } 80 }
81 81
@@ -99,8 +99,8 @@ function default_colors_format_css_rule($data, $parameter)
99 } 99 }
100 100
101 $key = str_replace('DEFAULT_COLORS_', '', $parameter); 101 $key = str_replace('DEFAULT_COLORS_', '', $parameter);
102 $key = str_replace('_', '-', strtolower($key)) .'-color'; 102 $key = str_replace('_', '-', strtolower($key)) . '-color';
103 return ' --'. $key .': '. $data[$parameter]; 103 return ' --' . $key . ': ' . $data[$parameter];
104} 104}
105 105
106 106