commit f4345f6f17fbb3c2ea67106d64d71815ddf10671 Author: Joel Pittet Date: Sun May 26 16:54:20 2013 -0700 remove drupal_render_children diff --git a/core/modules/color/color.module b/core/modules/color/color.module index 16320e1..5f7de1e 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -243,10 +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']; - - // @todo Remove/refactor pending http://drupal.org/node/1920886. - $children = $variables['form']; + $form =& $variables['form']; $theme = $form['theme']['#value']; $info = $form['info']['#value']; @@ -266,10 +263,7 @@ function template_preprocess_color_scheme_form(&$variables) { } $variables['colors'] = $colors; - // Remove elements from the 'children' render array. - // @todo Refactor when http://drupal.org/node/1920886 is resolved. - unset($children['palette'], $children['scheme']); - $variables['children'] = drupal_render_children($children); + unset($form['palette'], $form['scheme']); // 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 3462a89..74b3652 100644 --- a/core/modules/color/templates/color-scheme-form.html.twig +++ b/core/modules/color/templates/color-scheme-form.html.twig @@ -7,7 +7,7 @@ * - 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. - * - children: Child elements of the form that still need to be printed. + * - form: Child elements of the form that still need to be printed. * - html_preview: A HTML preview of the theme's current color scheme. * * @see template_preprocess() @@ -23,7 +23,7 @@ {{ color }} {% endfor %} - {{ children }} + {{ form }}

{{ 'Preview'|t }}

{{ html_preview }}