function xmlsitemap_generate_page in XML sitemap 6.2
Same name and namespace in other branches
- 7.2 xmlsitemap.generate.inc \xmlsitemap_generate_page()
Generate one page (chunk) of the sitemap.
Parameters
$sitemap: An unserialized data array for an XML sitemap.
$page: An integer of the specific page of the sitemap to generate.
1 call to xmlsitemap_generate_page()
- xmlsitemap_regenerate_batch_generate in ./
xmlsitemap.generate.inc - Batch callback; generate all pages of a sitemap.
File
- ./
xmlsitemap.generate.inc, line 148 - Sitemap generation and rebuilding functions for the xmlsitemap module.
Code
function xmlsitemap_generate_page(stdClass $sitemap, $page) {
xmlsitemap_load_all_includes();
try {
$writer = new XMLSitemapWriter($sitemap, $page);
$writer
->startDocument();
$writer
->generateXML();
$writer
->endDocument();
} catch (Exception $e) {
trigger_error($e
->getMessage(), E_USER_ERROR);
throw $e;
return FALSE;
}
return $writer
->getSitemapElementCount();
}