diff --git a/core/modules/update/update.module b/core/modules/update/update.module index 09b1c04..702958d 100644 --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -191,10 +191,6 @@ function update_theme() { 'variables' => array('version' => NULL, 'tag' => NULL, 'class' => array()), 'file' => 'update.report.inc', ), - 'update_status_label' => array( - 'variables' => array('status' => NULL), - 'file' => 'update.report.inc', - ), ); } diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc index e2f56fa..ff8b789 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -7,6 +7,7 @@ use Drupal\Component\Utility\SafeMarkup; use Drupal\Component\Utility\String; +use Drupal\Core\Template\Attribute; /** * Prepares variables for project status report templates. @@ -242,7 +243,7 @@ function template_preprocess_update_project_status(&$variables) { if (!empty($project['extra'])) { foreach ($project['extra'] as $value) { $extra_item = array(); - $extra_item['attributes'] = array(array('class' => $value['class'])); + $extra_item['attributes'] = new Attribute(array('class' => $value['class'])); $extra_item['label'] = $value['label']; $extra_item['data'] = drupal_placeholder($value['data']); $variables['extras'][] = $extra_item; @@ -311,7 +312,7 @@ function template_preprocess_update_project_status(&$variables) { break; } $variables['status']['label'] = $status_label; - $variables['status']['attributes'] = array($status_attributes); + $variables['status']['attributes'] = new Attribute($status_attributes); $variables['status']['reason'] = (isset($project['reason'])) ? $project['reason'] : NULL; switch ($project['status']) { @@ -350,36 +351,6 @@ function template_preprocess_update_project_status(&$variables) { } /** - * Returns HTML for a label to display for a project's update status. - * - * @param array $variables - * An associative array containing: - * - status: The integer code for a project's current update status. - * - * @see update_calculate_project_data() - * @ingroup themeable - */ -function theme_update_status_label($variables) { - switch ($variables['status']) { - case UPDATE_NOT_SECURE: - return '' . t('Security update required!') . ''; - - case UPDATE_REVOKED: - return '' . t('Revoked!') . ''; - - case UPDATE_NOT_SUPPORTED: - return '' . t('Not supported!') . ''; - - case UPDATE_NOT_CURRENT: - return '' . t('Update available') . ''; - - case UPDATE_CURRENT: - return '' . t('Up to date') . ''; - - } -} - -/** * Returns HTML for the version display of a project. * * @param array $variables