Helper for hook_form_FORM_ID_alter() implementations.
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',
),
),
));
}
}
}
}