function hook_xmlsitemap_context in XML sitemap 2.x
Same name and namespace in other branches
- 8 xmlsitemap.api.php \hook_xmlsitemap_context()
- 6.2 xmlsitemap.api.php \hook_xmlsitemap_context()
- 7.2 xmlsitemap.api.php \hook_xmlsitemap_context()
Provide information about the current context on the site.
See also
hook_xmlsitemap_context_alter()
1 function implements hook_xmlsitemap_context()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- language_xmlsitemap_context in ./
xmlsitemap.module - Implements hook_xmlsitemap_context() for language module.
1 invocation of hook_xmlsitemap_context()
- xmlsitemap_get_current_context in ./
xmlsitemap.module - Get the sitemap context of the current request.
File
- ./
xmlsitemap.api.php, line 155 - Hooks provided by the XML sitemap module.
Code
function hook_xmlsitemap_context() {
$context = [];
if ($vid = mymodule_get_current_vocabulary()) {
$context['vocabulary'] = $vid;
}
return $context;
}