Add colors from palette support to the button
[MAILPOET-5741]
This commit is contained in:
committed by
Rostislav Wolný
parent
299d51effa
commit
875fde56e9
@ -188,4 +188,14 @@ class SettingsController {
|
||||
}
|
||||
return $fontSize;
|
||||
}
|
||||
|
||||
public function translateSlugToColor(string $colorSlug): string {
|
||||
$settings = $this->getTheme()->get_settings();
|
||||
foreach ($settings['color']['palette']['default'] as $colorDefinition) {
|
||||
if ($colorDefinition['slug'] === $colorSlug) {
|
||||
return $colorDefinition['color'];
|
||||
}
|
||||
}
|
||||
return $colorSlug;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user