You are here

animate_css.install in Animate CSS 7

Same filename and directory in other branches
  1. 8 animate_css.install

Requirements page for Animate Css.

File

animate_css.install
View source
<?php

/**
 * @file
 * Requirements page for Animate Css.
 */

/**
 * Implements hook_requirements().
 */
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;
}

/**
 * Implements hook_uninstall().
 */
function animate_css_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'animate_css_%'");
}

Functions