' . $screenshot . '
' . $theme->info['name'] . ' ' . (isset($theme->info['version']) ? $theme->info['version'] : '') . $notes . '
' . $description . '
';
+ $current_theme['attributes'] = new Attribute(array('class' => $theme->classes));
+ $current_theme['name'] = $theme->info['name'];
+ $current_theme['version'] = isset($theme->info['version']) ? $theme->info['version'] : '';
+ $current_theme['notes'] = count($theme->notes) ? '(' . join(', ', $theme->notes) . ')' : '';
// Make sure to provide feedback on compatibility.
if (!empty($theme->incompatible_core)) {
- $output .= '
' . t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => \Drupal::CORE_COMPATIBILITY)) . '
';
+ $current_theme['compatibility'] = t('This version is not compatible with Drupal !core_version and should be replaced.', array('!core_version' => \Drupal::CORE_COMPATIBILITY));
}
elseif (!empty($theme->incompatible_php)) {
if (substr_count($theme->info['php'], '.') < 2) {
$theme->info['php'] .= '.*';
}
- $output .= '
' . t('This theme requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $theme->info['php'], '!php_version' => phpversion())) . '
';
+ $current_theme['compatibility'] = t('This theme requires PHP version @php_required and is incompatible with PHP version !php_version.', array('@php_required' => $theme->info['php'], '!php_version' => phpversion()));
}
elseif (!empty($theme->incompatible_base)) {
- $output .= '
' . t('This theme requires the base theme @base_theme to operate correctly.', array('@base_theme' => $theme->info['base theme'])) . '
';
+ $current_theme['compatibility'] = t('This theme requires the base theme @base_theme to operate correctly.', array('@base_theme' => $theme->info['base theme']));
}
elseif (!empty($theme->incompatible_engine)) {
- $output .= '
' . t('This theme requires the theme engine @theme_engine to operate correctly.', array('@theme_engine' => $theme->info['engine'])) . '
';
+ $current_theme['compatibility'] = t('This theme requires the theme engine @theme_engine to operate correctly.', array('@theme_engine' => $theme->info['engine']));
}
else {
- $links = array(
+ $current_theme['compatibility'] = array(
'#theme' => 'links',
'#links' => $theme->operations,
'#attributes' => array(
'class' => array('operations', 'clearfix'),
),
);
- $output .= drupal_render($links);
}
- $output .= '