function xmlsitemap_get_changefreq in XML sitemap 6.2
Same name and namespace in other branches
- 8 xmlsitemap.module \xmlsitemap_get_changefreq()
- 7.2 xmlsitemap.module \xmlsitemap_get_changefreq()
- 2.x xmlsitemap.module \xmlsitemap_get_changefreq()
Determine the frequency of updates to a link.
Parameters
$interval: An interval value in seconds.
Return value
A string representing the update frequency according to the sitemaps.org protocol.
3 calls to xmlsitemap_get_changefreq()
- XMLSitemapUnitTest::testGetChangefreq in ./
xmlsitemap.test - Tests for xmlsitemap_get_changefreq().
- xmlsitemap_custom_list_links in xmlsitemap_custom/
xmlsitemap_custom.admin.inc - xmlsitemap_generate_chunk in ./
xmlsitemap.generate.inc
File
- ./
xmlsitemap.module, line 1092 - Main file for the xmlsitemap module.
Code
function xmlsitemap_get_changefreq($interval) {
if ($interval <= 0 || !is_numeric($interval)) {
return FALSE;
}
foreach (xmlsitemap_get_changefreq_options() as $value => $frequency) {
if ($interval <= $value) {
return $frequency;
}
}
return 'never';
}