You are here

function xmlsitemap_help in XML sitemap 6.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_help()
  2. 5.2 xmlsitemap/xmlsitemap.module \xmlsitemap_help()
  3. 5 xmlsitemap.module \xmlsitemap_help()
  4. 6 xmlsitemap.module \xmlsitemap_help()
  5. 7.2 xmlsitemap.module \xmlsitemap_help()
  6. 2.x xmlsitemap.module \xmlsitemap_help()

Implements hook_help().

File

./xmlsitemap.module, line 64
Main file for the xmlsitemap module.

Code

function xmlsitemap_help($path, $arg) {
  $output = '';
  switch ($path) {
    case 'admin/help/xmlsitemap':
    case 'admin/settings/xmlsitemap/settings/%/%/%':
    case 'admin/settings/xmlsitemap/edit/%':
    case 'admin/settings/xmlsitemap/delete/%':
      return;
    case 'admin/help#xmlsitemap':
      break;
    case 'admin/settings/xmlsitemap':
      if (!module_exists('elements')) {
        $output .= '<p>' . t('In order to perform bulk operations on the sitemaps listed below, it is highly recommended to download and install the <a href="@elements">Elements module</a>.', array(
          '@elements' => 'http://drupal.org/project/elements',
        )) . '</p>';
      }
      break;
    case 'admin/settings/xmlsitemap/rebuild':
      $output .= '<p>' . t("This action rebuilds your site's XML sitemap and regenerates the cached files, and may be a lengthy process. If you just installed XML sitemap, this can be helpful to import all your site's content into the sitemap. Otherwise, this should only be used in emergencies.") . '</p>';
  }
  if (arg(0) == 'admin' && strpos($path, 'xmlsitemap') !== FALSE && user_access('administer xmlsitemap')) {
    module_load_include('inc', 'xmlsitemap');
    if ($arg[1] == 'settings') {

      // Alert the user to any potential problems detected by hook_requirements.
      xmlsitemap_check_status();
    }
    $output .= _xmlsitemap_get_blurb();
  }
  return $output;
}