You are here

function jquery_update_requirements in jQuery Update 7

Same name and namespace in other branches
  1. 5.2 jquery_update.install \jquery_update_requirements()
  2. 5 jquery_update.module \jquery_update_requirements()
  3. 6.2 jquery_update.install \jquery_update_requirements()
  4. 6 jquery_update.install \jquery_update_requirements()
  5. 7.3 jquery_update.install \jquery_update_requirements()
  6. 7.2 jquery_update.install \jquery_update_requirements()

Implementation of hook_requirements().

File

./jquery_update.install, line 11
Install file for jQuery Update.

Code

function jquery_update_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    $t = get_t();
    $jquery = drupal_get_library('system', 'jquery');
    $ui = drupal_get_library('system', 'ui');
    $requirements['jquery_update'] = array(
      'title' => $t('jQuery Update'),
      'severity' => REQUIREMENT_OK,
      'value' => t('jQuery %jquery and jQuery UI %ui', array(
        '%jquery' => $jquery['version'],
        '%ui' => $ui['version'],
      )),
    );
  }
  return $requirements;
}