You are here

public function XMLSitemapWriter::writeSitemapElement in XML sitemap 6.2

Same name and namespace in other branches
  1. 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()
XMLSitemapIndexWriter::generateXML in ./xmlsitemap.xmlsitemap.inc

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();
  }
}