function hook_simple_sitemap_index_attributes_alter in Simple XML sitemap 4.x
Same name and namespace in other branches
- 8.3 simple_sitemap.api.php \hook_simple_sitemap_index_attributes_alter()
- 8.2 simple_sitemap.api.php \hook_simple_sitemap_index_attributes_alter()
Alters attributes of the sitemap index shortly before XML document generation. Attributes can be added, changed and removed.
Parameters
array &$index_attributes:
string $sitemap_variant:
1 invocation of hook_simple_sitemap_index_attributes_alter()
- SitemapGeneratorBase::getIndexXml in src/
Plugin/ simple_sitemap/ SitemapGenerator/ SitemapGeneratorBase.php
File
- ./
simple_sitemap.api.php, line 101 - Hooks provided by the Simple XML Sitemap module.
Code
function hook_simple_sitemap_index_attributes_alter(array &$index_attributes, $sitemap_variant) {
// Add some attribute to the sitemap index.
$index_attributes['name'] = 'value';
}