function no_index_requirements in Util 7
Same name and namespace in other branches
- 6.3 contribs/no_index/no_index.module \no_index_requirements()
Implements hook_requirements(). Add note if not SE indexing.
File
- contribs/
no_index/ no_index.module, line 57 - Prevent search indexing. Adding a robots header isn't necessarily a sure thing. It's not supported by all search engines and will not guarantee your site will be excluded. Read:…
Code
function no_index_requirements($phase) {
$requirements = array();
switch ($phase) {
case 'runtime':
if (variable_get('no_index_setting', 0)) {
$sev = REQUIREMENT_WARNING;
$msg = t('Search engines are being instructed to ignore this site.');
}
else {
$sev = REQUIREMENT_INFO;
$msg = t('The No_index module is enabled, but not blocking search engines.');
}
$requirements['no_index_status'] = array(
'title' => 'No Index',
'value' => $msg,
'severity' => $sev,
);
}
return $requirements;
}