You are here

public function XMLSitemapIndexWriter::getRootAttributes in XML sitemap 7.2

Same name and namespace in other branches
  1. 6.2 xmlsitemap.xmlsitemap.inc \XMLSitemapIndexWriter::getRootAttributes()

Get Root Attributes.

Overrides XMLSitemapWriter::getRootAttributes

File

./xmlsitemap.xmlsitemap.inc, line 262
XML sitemap integration functions for xmlsitemap.module.

Class

XMLSitemapIndexWriter
XML Sitemap Index Writer.

Code

public function getRootAttributes() {
  $attributes['xmlns'] = 'http://www.sitemaps.org/schemas/sitemap/0.9';
  if (variable_get('xmlsitemap_developer_mode', 0)) {
    $attributes['xmlns:xsi'] = 'http://www.w3.org/2001/XMLSchema-instance';
    $attributes['xsi:schemaLocation'] = 'http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd';
  }
  drupal_alter('xmlsitemap_root_attributes', $attributes, $this->sitemap);
  return $attributes;
}