function date_ap_style_help in AP Style Date 7
Same name and namespace in other branches
- 8 date_ap_style.module \date_ap_style_help()
Implements hook_help().
File
- ./
date_ap_style.module, line 11 - Formats dates and times to use "AP" Style.
Code
function date_ap_style_help($path, $arg) {
switch ($path) {
case 'admin/help#date_ap_style':
$filepath = dirname(__FILE__) . '/README.md';
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;
}
}