You are here

function robotstxt_install in RobotsTxt 6

Same name and namespace in other branches
  1. 8 robotstxt.install \robotstxt_install()
  2. 5 robotstxt.install \robotstxt_install()
  3. 7 robotstxt.install \robotstxt_install()

Implementation of hook_install().

File

./robotstxt.install, line 6

Code

function robotstxt_install() {
  if (file_exists('./robots.txt')) {
    variable_set('robotstxt', file_get_contents('./robots.txt'));
  }
  elseif (file_exists(drupal_get_path('module', 'robotstxt') . '/robots.txt')) {
    variable_set('robotstxt', file_get_contents(drupal_get_path('module', 'robotstxt') . '/robots.txt'));
  }
}