animate_css.install in Animate CSS 7
Same filename and directory in other branches
Requirements page for Animate Css.
File
animate_css.installView 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
Name | Description |
---|---|
animate_css_requirements | Implements hook_requirements(). |
animate_css_uninstall | Implements hook_uninstall(). |