function _print_robots_meta_generator in Printer, email and PDF versions 7.2
Same name and namespace in other branches
- 5.4 print.pages.inc \_print_robots_meta_generator()
- 5 print.module \_print_robots_meta_generator()
- 5.2 print.module \_print_robots_meta_generator()
- 5.3 print.pages.inc \_print_robots_meta_generator()
- 6 print.pages.inc \_print_robots_meta_generator()
- 7 print.pages.inc \_print_robots_meta_generator()
- 5.x print.pages.inc \_print_robots_meta_generator()
Generates a robots meta tag to tell them what they may index.
Return value
string meta robots tag
1 call to _print_robots_meta_generator()
- print_preprocess_print in ./
print.pages.inc - Implements hook_preprocess_HOOK().
File
- ./
print.pages.inc, line 372
Code
function _print_robots_meta_generator() {
$robots_meta = array();
if (variable_get('print_robots_noindex', PRINT_ROBOTS_NOINDEX_DEFAULT)) {
$robots_meta[] = 'noindex';
}
if (variable_get('print_robots_nofollow', PRINT_ROBOTS_NOFOLLOW_DEFAULT)) {
$robots_meta[] = 'nofollow';
}
if (variable_get('print_robots_noarchive', PRINT_ROBOTS_NOARCHIVE_DEFAULT)) {
$robots_meta[] = 'noarchive';
}
if (count($robots_meta) > 0) {
return '<meta name="robots" content="' . implode(', ', $robots_meta) . '" />';
}
else {
return '';
}
}