function hook_simple_sitemap_url_generators_alter in Simple XML sitemap 8.2
Same name and namespace in other branches
- 8.3 simple_sitemap.api.php \hook_simple_sitemap_url_generators_alter()
- 4.x simple_sitemap.api.php \hook_simple_sitemap_url_generators_alter()
Alter properties of and remove generator plugins.
Parameters
array $generators:
1 invocation of hook_simple_sitemap_url_generators_alter()
- UrlGeneratorManager::__construct in src/
Plugin/ simple_sitemap/ UrlGenerator/ UrlGeneratorManager.php - UrlGeneratorManager constructor.
File
- ./
simple_sitemap.api.php, line 100 - Hooks provided by the Simple XML sitemap module.
Code
function hook_simple_sitemap_url_generators_alter(array &$generators) {
// Remove the entity generator.
// Useful when creating your own entity generator plugin.
unset($generators['entity']);
// Change the weight of the arbitrary link generator.
$generators['arbitrary']['weight'] = -100;
}