function xmlsitemap_get_changefreq in XML sitemap 7.2
Same name and namespace in other branches
- 8 xmlsitemap.module \xmlsitemap_get_changefreq()
- 6.2 xmlsitemap.module \xmlsitemap_get_changefreq()
- 2.x xmlsitemap.module \xmlsitemap_get_changefreq()
Determine the frequency of updates to a link.
Parameters
string $interval: An interval value in seconds.
Return value
string 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 - List Links.
- xmlsitemap_generate_chunk in ./
xmlsitemap.generate.inc - Generate chunk.
File
- ./
xmlsitemap.module, line 1289 - xmlsitemap XML sitemap
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';
}