You are here

function xmlsitemap_xmlsitemap_link_alter in XML sitemap 6.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_xmlsitemap_link_alter()
  2. 7.2 xmlsitemap.xmlsitemap.inc \xmlsitemap_xmlsitemap_link_alter()
  3. 2.x xmlsitemap.module \xmlsitemap_xmlsitemap_link_alter()

Implements hook_xmlsitemap_link_alter().

File

./xmlsitemap.xmlsitemap.inc, line 265
XML sitemap integration functions for xmlsitemap.module.

Code

function xmlsitemap_xmlsitemap_link_alter(&$link) {

  // Alter the frontpage priority.
  if ($link['type'] == 'frontpage' || $link['loc'] == '' || $link['loc'] == drupal_get_normal_path(variable_get('site_frontpage', 'node'))) {
    $link['priority'] = variable_get('xmlsitemap_frontpage_priority', 1.0);
    $link['changefreq'] = variable_get('xmlsitemap_frontpage_changefreq', XMLSITEMAP_FREQUENCY_DAILY);
  }
}