function theme_update_status_label

theme_update_status_label($variables)

Returns HTML for a label to display for a project's update status.

Parameters

array $variables: An associative array containing:

  • status: The integer code for a project's current update status.

See also

update_calculate_project_data()

Related topics

File

modules/update/update.report.inc, line 264
Code required only when rendering the available updates report.

Code

function theme_update_status_label($variables) {
  switch ($variables['status']) {
    case UPDATE_NOT_SECURE:
      return '<span class="security-error">' . t('Security update required!') . '</span>';

    case UPDATE_REVOKED:
      return '<span class="revoked">' . t('Revoked!') . '</span>';

    case UPDATE_NOT_SUPPORTED:
      return '<span class="not-supported">' . t('Not supported!') . '</span>';

    case UPDATE_NOT_CURRENT:
      return '<span class="not-current">' . t('Update available') . '</span>';

    case UPDATE_CURRENT:
      return '<span class="current">' . t('Up to date') . '</span>';

  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!update!update.report.inc/function/theme_update_status_label/7.x