function theme_update_last_check

theme_update_last_check($variables)

Returns HTML for the last time we checked for update data.

In addition to properly formatting the given timestamp, this function also provides a "Check manually" link that refreshes the available update and redirects back to the same page.

Parameters

$variables: An associative array containing:

  • last: The timestamp when the site last checked for available updates.

See also

theme_update_report()

theme_update_available_updates_form()

Related topics

File

modules/update/update.module, line 660
Handles updates of Drupal core and contributed projects.

Code

function theme_update_last_check($variables) {
  $last = $variables['last'];
  $output = '<div class="update checked">';
  $output .= $last ? t('Last checked: @time ago', array('@time' => format_interval(REQUEST_TIME - $last))) : t('Last checked: never');
  $output .= ' <span class="check-manually">(' . l(t('Check manually'), 'admin/reports/updates/check', array('query' => drupal_get_destination())) . ')</span>';
  $output .= "</div>\n";
  return $output;
}

© 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.module/function/theme_update_last_check/7.x