You are here

function xmlsitemap_node_excludes in XML sitemap 5.2

Get array of excluded types.

Return value

An array of node types to exclude.

1 call to xmlsitemap_node_excludes()
xmlsitemap_node_xmlsitemap_links in xmlsitemap_node/xmlsitemap_node.module
Implementation of hook_xmlsitemap_links().

File

xmlsitemap_node/xmlsitemap_node.module, line 386
Adds nodes to the sitemap.

Code

function xmlsitemap_node_excludes() {
  static $excludes;
  if (!isset($excludes)) {
    $excludes = array();
    foreach (node_get_types() as $type => $name) {
      if (variable_get("xmlsitemap_node_type_priority_{$type}", 0.5) < 0) {
        $excludes[] = $type;
      }
    }
    if (empty($excludes)) {
      $excludes = array(
        0,
      );
    }
  }
  return $excludes;
}