You are here

function _systeminfo_admin_drupal_themes in System Information 6.3

Same name and namespace in other branches
  1. 7.3 systeminfo.admin.drupal.inc \_systeminfo_admin_drupal_themes()
1 call to _systeminfo_admin_drupal_themes()
systeminfo_admin_drupal in ./systeminfo.admin.drupal.inc
Menu callback; displays the Drupal page.

File

./systeminfo.admin.drupal.inc, line 173
Admin Drupal page callbacks for the systeminfo module.

Code

function _systeminfo_admin_drupal_themes() {
  $sort = variable_get('systeminfo_drupal_themes_sort', 'name');
  $header = array();
  $header[] = t('Name');
  $header[] = t('Version');
  $header[] = t('Date stamp');
  $header[] = t('Filename');
  $header[] = t('Base theme');
  $rows = array();
  foreach (list_themes() as $theme) {
    if ($theme->status) {
      $row = array();
      $row[] = $theme->info['name'];
      $row[] = $theme->info['version'];
      $row[] = isset($theme->info['datestamp']) ? format_date($theme->info['datestamp'], 'small') : '';
      $row[] = $theme->filename;
      $row[] = isset($theme->base_theme) ? $theme->base_theme : '';
      $key = $sort == 'name' ? $theme->name : $theme->filename;
      $rows[$key] = $row;
    }
  }
  if ($sort == 'name' || $sort == 'filename') {
    ksort($rows);
  }
  return theme('table', $header, $rows, array(
    'class' => 'systeminfo',
  ));
}