diff --git a/core/modules/color/color.module b/core/modules/color/color.module index 5f7de1e..8956c7a 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -243,7 +243,7 @@ function color_scheme_form($complete_form, &$form_state, $theme) { * - form: A render element representing the form. */ function template_preprocess_color_scheme_form(&$variables) { - $form =& $variables['form']; + $form = $variables['form']; $theme = $form['theme']['#value']; $info = $form['info']['#value']; @@ -255,15 +255,12 @@ function template_preprocess_color_scheme_form(&$variables) { // Add the JS at a weight below color.js. drupal_add_js($preview_js_path, array('weight' => -1)); - $variables['scheme'] = $form['scheme']; - $colors = array(); foreach (element_children($form['palette']) as $name) { $colors[] = $form['palette'][$name]; } $variables['colors'] = $colors; - - unset($form['palette'], $form['scheme']); + unset($variables['form']['palette']); // Attempt to load preview HTML if the theme provides it. $preview_html_path = DRUPAL_ROOT . '/' . (isset($info['preview_html']) ? drupal_get_path('theme', $theme) . '/' . $info['preview_html'] : drupal_get_path('module', 'color') . '/preview.html'); diff --git a/core/modules/color/templates/color-scheme-form.html.twig b/core/modules/color/templates/color-scheme-form.html.twig index 74b3652..23e85ba 100644 --- a/core/modules/color/templates/color-scheme-form.html.twig +++ b/core/modules/color/templates/color-scheme-form.html.twig @@ -4,10 +4,10 @@ * Default theme implementation for a theme's color form. * * Available variables: - * - scheme: A color scheme form element. For example: a select element with - * color theme presets, or a color picker widget. * - colors: Colors that can be changed by entering in a new hex value. * - form: Child elements of the form that still need to be printed. + * - scheme: A color scheme form element. For example: a select element with + * color theme presets, or a color picker widget. * - html_preview: A HTML preview of the theme's current color scheme. * * @see template_preprocess() @@ -17,7 +17,7 @@ */ #}