function xmlsitemap_get_context_info in XML sitemap 7.2
Same name and namespace in other branches
- 8 xmlsitemap.module \xmlsitemap_get_context_info()
- 6.2 xmlsitemap.module \xmlsitemap_get_context_info()
- 2.x xmlsitemap.module \xmlsitemap_get_context_info()
Related topics
1 call to xmlsitemap_get_context_info()
- xmlsitemap_sitemap_list_form in ./
xmlsitemap.admin.inc - Render a tableselect list of XML sitemaps for the main admin page.
File
- ./
xmlsitemap.module, line 1572 - xmlsitemap XML sitemap
Code
function xmlsitemap_get_context_info($context = NULL, $reset = FALSE) {
global $language;
$info =& drupal_static(__FUNCTION__);
if ($reset) {
$info = NULL;
}
elseif ($cached = cache_get('xmlsitemap:context_info:' . $language->language)) {
$info = $cached->data;
}
if (!isset($info)) {
$info = module_invoke_all('xmlsitemap_context_info');
drupal_alter('xmlsitemap_context_info', $info);
ksort($info);
// Cache by language since this info contains translated strings.
cache_set('xmlsitemap:context_info:' . $language->language, $info);
}
if (isset($context)) {
return isset($info[$context]) ? $info[$context] : NULL;
}
return $info;
}