function xmlsitemap_recalculate_changefreq in XML sitemap 6.2
Same name and namespace in other branches
- 8 xmlsitemap.module \xmlsitemap_recalculate_changefreq()
- 7.2 xmlsitemap.module \xmlsitemap_recalculate_changefreq()
- 2.x xmlsitemap.module \xmlsitemap_recalculate_changefreq()
Recalculate the changefreq of a sitemap link.
Parameters
$link: A sitemap link array.
1 call to xmlsitemap_recalculate_changefreq()
File
- ./
xmlsitemap.module, line 1159 - Main file for the xmlsitemap module.
Code
function xmlsitemap_recalculate_changefreq(&$link) {
$link['changefreq'] = round(($link['changefreq'] * $link['changecount'] + (REQUEST_TIME - $link['lastmod'])) / ($link['changecount'] + 1));
$link['changecount']++;
$link['lastmod'] = REQUEST_TIME;
}