You are here

function hook_simple_sitemap_attributes_alter in Simple XML sitemap 8.2

Same name and namespace in other branches
  1. 8.3 simple_sitemap.api.php \hook_simple_sitemap_attributes_alter()
  2. 4.x simple_sitemap.api.php \hook_simple_sitemap_attributes_alter()

Alters the sitemap attributes shortly before XML document generation. Attributes can be added, changed and removed.

Parameters

array &$attributes:

1 invocation of hook_simple_sitemap_attributes_alter()
SitemapGenerator::generateSitemapChunk in src/SitemapGenerator.php
Generates and returns a sitemap chunk.

File

./simple_sitemap.api.php, line 77
Hooks provided by the Simple XML sitemap module.

Code

function hook_simple_sitemap_attributes_alter(array &$attributes) {

  // Remove the xhtml attribute e.g. if no xhtml sitemap elements are present.
  unset($attributes['xmlns:xhtml']);
}