You are here

function webform_view_help in Webform view 7

Same name and namespace in other branches
  1. 7.4 webform_view.module \webform_view_help()

Implements hook_help().

File

./webform_view.module, line 66
Allows views to be embedded in webforms and used as submission data.

Code

function webform_view_help($path, $arg) {
  $modulename = 'webform_view';
  switch ($path) {
    case 'admin/help#' . $modulename:
      $help_dir = drupal_get_path('module', $modulename) . '/help';
      $text = file_get_contents("{$help_dir}/index.html");
      $text = preg_replace('/(src|href)="([^\\/][^"]+)"/', '$1="' . url($help_dir) . '/$2"', $text);
      return $text;
  }
  return FALSE;
}