function _color_theme_select_form_alter

Helper for hook_form_FORM_ID_alter() implementations.

1 call to _color_theme_select_form_alter()

File

drupal/modules/color/color.module, line 64
Allows users to change the color scheme of themes.

Code

function _color_theme_select_form_alter(&$form, &$form_state) {

  // Use the generated screenshot in the theme list.
  $themes = list_themes();
  foreach (element_children($form) as $theme) {
    if ($screenshot = variable_get('color_' . $theme . '_screenshot')) {
      if (isset($form[$theme]['screenshot'])) {
        $form[$theme]['screenshot']['#markup'] = theme('image', array(
          'path' => $screenshot,
          'title' => '',
          'attributes' => array(
            'class' => array(
              'screenshot',
            ),
          ),
        ));
      }
    }
  }
}