function hook_xmlsitemap_context_alter in XML sitemap 8
Same name and namespace in other branches
- 6.2 xmlsitemap.api.php \hook_xmlsitemap_context_alter()
- 7.2 xmlsitemap.api.php \hook_xmlsitemap_context_alter()
- 2.x xmlsitemap.api.php \hook_xmlsitemap_context_alter()
Alter the current context information.
See also
1 invocation of hook_xmlsitemap_context_alter()
- xmlsitemap_get_current_context in ./
xmlsitemap.module - Get the sitemap context of the current request.
File
- ./
xmlsitemap.api.php, line 168 - Hooks provided by the XML sitemap module.
Code
function hook_xmlsitemap_context_alter(&$context) {
$currentUser = \Drupal::currentUser();
if ($currentUser
->hasPermission('administer taxonomy')) {
unset($context['vocabulary']);
}
}