You are here

function _humanstxt_get_content in Humans.txt 7

Same name and namespace in other branches
  1. 6 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 56
humanstxt module file.

Code

function _humanstxt_get_content() {
  $content = variable_get('humanstxt', FALSE);
  if ($content === FALSE) {
    $file = DRUPAL_ROOT . '/humanstxt.txt';
    if (file_exists($file) && is_readable($file)) {
      $content = file_get_contents($file);
    }
  }
  return $content;
}