function _color_theme_select_form_alter

_color_theme_select_form_alter(&$form, &$form_state)

Helper for hook_form_FORM_ID_alter() implementations.

File

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'))));
      }
    }
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!color!color.module/function/_color_theme_select_form_alter/7.x