You are here

function animate_css_requirements in Animate CSS 7

Same name and namespace in other branches
  1. 8 animate_css.install \animate_css_requirements()

Implements hook_requirements().

File

./animate_css.install, line 11
Requirements page for Animate Css.

Code

function animate_css_requirements($phase) {
  $requirements = array();

  // Report the version of Animate.
  if ($phase == 'runtime') {

    // Make sure Libraries is loaded before loading Animate.
    drupal_load('module', 'libraries');
    $animate = libraries_detect('animate');
    $requirements['animate'] = array(
      'title' => $animate['name'],
      'severity' => $animate['installed'] ? REQUIREMENT_OK : REQUIREMENT_WARNING,
      'value' => $animate['installed'] ? $animate['version'] : $animate['error message'],
    );
  }
  return $requirements;
}