function _humanstxt_get_content in Humans.txt 6
Same name and namespace in other branches
- 7 humanstxt.module \_humanstxt_get_content()
Helper function to get the content of the humans.txt file.
2 calls to _humanstxt_get_content()
- humanstxt_admin_settings in ./
humanstxt.admin.inc - Settings for humans.txt file.
- humanstxt_file in ./
humanstxt.module - Callback to display humans.txt file.
File
- ./
humanstxt.module, line 55 - humanstxt module file.
Code
function _humanstxt_get_content() {
$content = variable_get('humanstxt', FALSE);
if ($content === FALSE) {
$file = getcwd() . '/humanstxt.txt';
if (file_exists($file) && is_readable($file)) {
$content = file_get_contents($file);
}
}
return $content;
}