You are here

function humanstxt_requirements in Humans.txt 7

Same name and namespace in other branches
  1. 6 humanstxt.module \humanstxt_requirements()

Implements hook_requirements().

File

./humanstxt.module, line 70
humanstxt module file.

Code

function humanstxt_requirements($phase) {
  $requirements = array();
  $t = get_t();
  switch ($phase) {
    case 'runtime':

      // Module cannot work without Clean URLs.
      if (!variable_get('clean_url', 0)) {
        $requirements['humanstxt_cleanurl'] = array(
          'title' => $t('Humanstxt'),
          'severity' => REQUIREMENT_ERROR,
          'value' => $t('<a href="!clean_url">Clean URLs</a> are mandatory for this module.', array(
            '!clean_url' => url('admin/config/search/clean-urls'),
          )),
        );
      }
  }
  return $requirements;
}