function no_index_init in Util 6.3
Same name and namespace in other branches
- 7 contribs/no_index/no_index.module \no_index_init()
Implements hook_init().
File
- contribs/
no_index/ no_index.module, line 40 - 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_init() {
if (variable_get('no_index_setting', 0)) {
$data = '<meta name="robots" content="noindex, nofollow" />' . "\n";
drupal_set_html_head($data);
}
}