You are here

function styleguide_form_system_themes_form_alter in Style Guide 6

Implements hook_form_FORM_ID_alter().

File

./styleguide.module, line 332

Code

function styleguide_form_system_themes_form_alter(&$form, $form_state) {
  if (!user_access('view style guides')) {
    return;
  }
  foreach (list_themes() as $theme) {
    if (styleguide_access_check($theme) && isset($form[$theme->name]['info']['#value']['description'])) {
      $operation = l(t('View styleguide'), 'admin/build/themes/styleguide/' . $theme->name);
      $form[$theme->name]['info']['#value']['description'] .= '<div class="styleguide-form-link">' . $operation . '</div>';
    }
  }
}