function xmlsitemap_term_xmlsitemap_links in XML sitemap 5
Same name and namespace in other branches
- 5.2 xmlsitemap_term/xmlsitemap_term.module \xmlsitemap_term_xmlsitemap_links()
Implementation of hook_xmlsitemap_links().
Related topics
File
- xmlsitemap_term/
xmlsitemap_term.module, line 15 - Adds terms to the site map.
Code
function xmlsitemap_term_xmlsitemap_links($type = NULL, $excludes = array()) {
$links = array();
if (!isset($type)) {
$links = _xmlsitemap_term_links(_xmlsitemap_term_excludes());
$links = array_merge($links, module_invoke_all('xmlsitemap_links', 'term', _xmlsitemap_term_excludes()));
$links = array_merge($links, module_invoke_all('gsitemap', 'term', _xmlsitemap_term_excludes()));
if (!empty($links)) {
foreach ($links as $key => $link) {
$tid[$key] = $link['tid'];
$loc[$key] = $link['#loc'];
}
array_multisort($tid, $loc, $links);
}
}
return $links;
}