You are here

aos.install in Animate On Scroll 7

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

Library requirements for AOS.

File

aos.install
View source
<?php

/**
 * @file
 * Library requirements for AOS.
 */

/**
 * Implements hook_requirements().
 */
function aos_requirements($phase) {
  $requirements = array();

  // Check requirements for status report page.
  if ($phase == 'runtime') {

    // Make sure libraries module is loaded.
    drupal_load('module', 'libraries');
    $aos = libraries_detect('aos');

    // Report the version of AOS library.
    $requirements['aos'] = array(
      'title' => $aos['name'],
      'severity' => $aos['installed'] ? REQUIREMENT_OK : REQUIREMENT_WARNING,
      'value' => $aos['installed'] ? $aos['version'] : $aos['error message'],
    );
  }
  return $requirements;
}

Functions

Namesort descending Description
aos_requirements Implements hook_requirements().