You are here

function _xmlsitemap_term_priority in XML sitemap 5

Calculate the priority of a term.

Parameters

$term: A term object:

Return value

A number between 0 and 1, or -1

Related topics

1 call to _xmlsitemap_term_priority()
_xmlsitemap_term_links in xmlsitemap_term/xmlsitemap_term.module
Get term links.

File

xmlsitemap_term/xmlsitemap_term.module, line 118
Adds terms to the site map.

Code

function _xmlsitemap_term_priority($term) {
  $priority = $term->priority_override;
  if (!isset($term->priority_override)) {
    $priority = variable_get("xmlsitemap_term_vocabulary_priority_{$term->vid}", 0.5);
    $priority = min($priority, 0.9);
  }
  return $priority;
}