You are here

function extra_body_classes_help in Extra body classes 7

Same name and namespace in other branches
  1. 8 extra_body_classes.module \extra_body_classes_help()

Implements hook_help().

File

./extra_body_classes.module, line 10
Main file for the Extra body classes module.

Code

function extra_body_classes_help($path, $arg) {
  switch ($path) {
    case 'admin/help#extra_body_classes':
      $path = dirname(__FILE__) . '/README.txt';
      if (file_exists($path)) {
        $readme = file_get_contents($path);
      }
      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;
  }
}