function _color_theme_select_form_alter
7.x color.module | _color_theme_select_form_alter(&$form, &$form_state) |
Helper for hook_form_FORM_ID_alter() implementations.
1 call to _color_theme_select_form_alter()
- color_form_system_themes_alter in drupal-7.x/
modules/ color/ color.module - Implements hook_form_FORM_ID_alter().
File
- drupal-7.x/
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'))));
}
}
}
}