function adstxt_requirements in AdsTxt 7
Same name and namespace in other branches
- 8 adstxt.install \adstxt_requirements()
Implements hook_requirements().
File
- ./
adstxt.install, line 11 - Install, update and uninstall functions for the adstxt module.
Code
function adstxt_requirements($phase) {
$requirements = array();
$t = get_t();
switch ($phase) {
case 'runtime':
if (file_exists(DRUPAL_ROOT . '/ads.txt')) {
$requirements['adstxt_file'] = array(
'title' => $t('Ads.txt'),
'severity' => REQUIREMENT_WARNING,
'value' => $t('Ads.txt module works only if you remove the existing ads.txt file in your website root.'),
);
}
}
return $requirements;
}