public function XMLSitemapWriter::getRootAttributes in XML sitemap 6.2
Same name and namespace in other branches
- 7.2 xmlsitemap.xmlsitemap.inc \XMLSitemapWriter::getRootAttributes()
Return an array of attributes for the root element of the XML.
1 call to XMLSitemapWriter::getRootAttributes()
1 method overrides XMLSitemapWriter::getRootAttributes()
- XMLSitemapIndexWriter::getRootAttributes in ./
xmlsitemap.xmlsitemap.inc - Return an array of attributes for the root element of the XML.
File
- ./
xmlsitemap.xmlsitemap.inc, line 89 - XML sitemap integration functions for xmlsitemap.module.
Class
- XMLSitemapWriter
- Extended class for writing XML sitemap files.
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/sitemap.xsd';
}
return $attributes;
}