public function XMLSitemapWriter::writeSitemapElement in XML sitemap 6.2
Same name and namespace in other branches
- 7.2 xmlsitemap.xmlsitemap.inc \XMLSitemapWriter::writeSitemapElement()
Write an full XML sitemap element tag.
Parameters
$name: The element name.
$element: An array of the elements properties and values.
1 call to XMLSitemapWriter::writeSitemapElement()
File
- ./
xmlsitemap.xmlsitemap.inc, line 121 - XML sitemap integration functions for xmlsitemap.module.
Class
- XMLSitemapWriter
- Extended class for writing XML sitemap files.
Code
public function writeSitemapElement($name, array &$element) {
$this
->writeElement($name, $element);
$this
->writeRaw(PHP_EOL);
// After a certain number of elements have been added, flush the buffer
// to the output file.
$this->sitemapElementCount++;
if ($this->sitemapElementCount % $this->linkCountFlush == 0) {
$this
->flush();
}
}