Commit 9a54a083 authored by targoo's avatar targoo Committed by targoo

Issue #2477681 by sdstyles, caspervoogt, targoo: Predefined color boxes - color defaults don't work

parent 17bef266
......@@ -123,7 +123,7 @@ function theme_color_field_default_widget($vars) {
$settings['id'] = $element['rgb']['#id'];
$settings['divid'] = 'div-' . $element['rgb']['#id'];
$settings['value'] = (isset($element['#value']['rgb'])) ? $element['#value']['rgb'] : '';
$default_colors = (isset($element['#settings']['default_colors'])) ? $element['#settings']['default_colors'] : '';
$default_colors = (isset($element['#instance_settings']['default_colors'])) ? $element['#instance_settings']['default_colors'] : '';
preg_match_all("/#[0-9a-fA-F]{6}/", $default_colors, $default_colors, PREG_SET_ORDER);
foreach ($default_colors as $color) {
$settings['colors'][] = $color[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment