function _xmlsitemap_links in XML sitemap 5
Get all site map links.
Return value
An array of links from hook_xmlsitemap_links().
Related topics
3 calls to _xmlsitemap_links()
- _xmlsitemap_link_count in ./
xmlsitemap.module - Count the total number of links in the site.
- _xmlsitemap_output_chunk in ./
xmlsitemap.module - Generate a chunk of the site map.
- _xmlsitemap_output_index in ./
xmlsitemap.module - Generate the site map index.
File
- ./
xmlsitemap.module, line 532 - Creates a site map compatible with the sitemaps.org schema.
Code
function _xmlsitemap_links() {
static $links;
if (!isset($links)) {
if (module_exists('i18n')) {
i18n_selection_mode('off');
}
$entries = module_invoke_all('xmlsitemap_links');
if (module_exists('i18n')) {
i18n_selection_mode('reset');
}
if (!empty($entries)) {
foreach ($entries as $key => $link) {
$lastmod[$key] = $link['#lastmod'];
}
array_multisort($lastmod, $entries);
}
$links = $entries;
}
return $links;
}