You are here

function theme_themekey_ui_theme_select_form in ThemeKey 6.4

Same name and namespace in other branches
  1. 6.2 themekey_ui_admin.inc \theme_themekey_ui_theme_select_form()
  2. 6.3 themekey_ui_admin.inc \theme_themekey_ui_theme_select_form()
  3. 7.3 themekey_ui_admin.inc \theme_themekey_ui_theme_select_form()
  4. 7 themekey_ui_admin.inc \theme_themekey_ui_theme_select_form()
  5. 7.2 themekey_ui_admin.inc \theme_themekey_ui_theme_select_form()

Theme the theme select form.

Parameters

$form: An associative array containing the structure of the form.

See also

theme_system_theme_select_form()

1 theme call to theme_themekey_ui_theme_select_form()
themekey_ui_theme_select_form in ./themekey_ui_admin.inc
Adds theme selector to a form

File

./themekey_ui_admin.inc, line 268

Code

function theme_themekey_ui_theme_select_form($form) {
  $rows = array();
  foreach (element_children($form) as $key) {
    $row = array();
    if (isset($form[$key]['description']) && is_array($form[$key]['description'])) {
      $row[] = drupal_render($form[$key]['screenshot']);
      $row[] = drupal_render($form[$key]['description']);
      $row[] = drupal_render($form['themekey_ui_theme'][$key]);
    }
    $rows[] = $row;
  }
  if (!empty($rows)) {
    $header = array(
      t('Screenshot'),
      t('Name'),
      t('Selected'),
    );
    $output = theme('table', $header, $rows);
    return $output;
  }
}