function xmlsitemap_xmlsitemap_links in XML sitemap 5
Same name and namespace in other branches
- 8 xmlsitemap.module \xmlsitemap_xmlsitemap_links()
- 6.2 xmlsitemap.xmlsitemap.inc \xmlsitemap_xmlsitemap_links()
- 7.2 xmlsitemap.xmlsitemap.inc \xmlsitemap_xmlsitemap_links()
- 2.x xmlsitemap.module \xmlsitemap_xmlsitemap_links()
Implementation of hook_xmlsitemap_links().
Related topics
File
- ./
xmlsitemap.module, line 615 - Creates a site map compatible with the sitemaps.org schema.
Code
function xmlsitemap_xmlsitemap_links($type = NULL, $excludes = array()) {
$links = array();
if (!isset($type)) {
global $base_url;
$links[] = array(
'#loc' => "{$base_url}/",
'#changefreq' => 'always',
'#priority' => variable_get('xmlsitemap_front_page_priority', 1),
);
$links = array_merge($links, _xmlsitemap_additional_links());
$links = array_merge($links, module_invoke_all('gsitemap'));
$links = array_merge($links, _xmlsitemap_xml_links());
if (!empty($links)) {
foreach ($links as $key => $link) {
$loc[$key] = $link['#loc'];
}
array_multisort($loc, $links);
}
}
return $links;
}