You are here

function xmlsitemap_xmlsitemap_link_alter in XML sitemap 7.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_xmlsitemap_link_alter()
  2. 6.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 335
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'] == variable_get('site_frontpage', 'node')) {
    $link['priority'] = variable_get('xmlsitemap_frontpage_priority', 1.0);
    $link['changefreq'] = variable_get('xmlsitemap_frontpage_changefreq', XMLSITEMAP_FREQUENCY_DAILY);
  }
}