You are here

function popup_message_requirements in Popup message 6

Implementation of hook_requirements().

File

./popup_message.install, line 11
Install, update and uninstall functions for the Popup message module.

Code

function popup_message_requirements($phase) {
  $requirements = array();
  if ($phase == 'runtime') {
    $library_path = popup_message_get_jquerycookie_path();
    if (!file_exists($library_path . '/jquery.cookie.js')) {
      $requirements['popup_message_jquerycookie'] = array(
        'title' => t('jQuery.cookie.js'),
        'value' => t('jQuery.cookie.js plugin is missing'),
        'severity' => REQUIREMENT_ERROR,
        'description' => t('You need to download the !jquerycookie and extract file into the %path folder of your server.', array(
          '!jquerycookie' => l(t('jquery.cookie.js file'), 'https://github.com/carhartl/jquery-cookie/'),
          '%path' => $library_path,
        )),
      );
    }
  }
  return $requirements;
}