You are here

function hfs_help in Header and Footer Scripts 7.2

Implements hook_help().

File

./hfs.module, line 76
Enables Drupal to add scripts and styles from frontend on all over the site.

Code

function hfs_help($path, $arg) {
  switch ($path) {
    case 'admin/help#header_and_footer_scripts':
      $filepath = dirname(__FILE__) . '/README.txt';
      if (file_exists($filepath)) {
        $readme = file_get_contents($filepath);
      }
      if (!isset($readme)) {
        return NULL;
      }
      if (module_exists('markdown')) {
        $filters = module_invoke('markdown', 'filter_info');
        $info = $filters['filter_markdown'];
        if (function_exists($info['process callback'])) {
          $output = $info['process callback']($readme, NULL);
        }
        else {
          $output = '<pre>' . $readme . '</pre>';
        }
      }
      else {
        $output = '<pre>' . $readme . '</pre>';
      }
      return $output;
  }
}