You are here

baguettebox.install in baguetteBox.js 7

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

Install functions for the baguettebox module.

File

baguettebox.install
View source
<?php

/**
 * @file
 * Install functions for the baguettebox module.
 */

/**
 * Implements hook_requirements().
 */
function baguettebox_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    $t = get_t();
    if (!file_exists(BAGUETTEBOX_LIBRARY_DIR . '/baguetteBox.min.js')) {
      $requirements['baguettebox_library'] = array(
        'title' => $t('BaguetteBox library'),
        'value' => $t('Not found'),
        'severity' => REQUIREMENT_ERROR,
        'description' => $t('You need to download the <a href="!library_url">baguetteBox library</a> and extract the archive to the <em>baguettebox</em> directory in the <em>sites/all/libraries</em> directory on your server.', array(
          '!library_url' => 'https://github.com/feimosi/baguetteBox.js',
        )),
      );
    }
  }
  return $requirements;
}

Functions

Namesort descending Description
baguettebox_requirements Implements hook_requirements().