Commit 6bff35cf authored by Dave Reid's avatar Dave Reid
Browse files

by Dave Reid: Implement hook_entity_info_alter() instead of hook_xmlsitemap_link_info().

parent e079a7ab
......@@ -2,18 +2,17 @@
// $Id$
/**
* Implements hook_xmlsitemap_link_info().
* Implements hook_entity_info_alter().
*/
function xmlsitemap_node_xmlsitemap_link_info() {
return array(
'node' => array(
'purge' => TRUE,
'table' => 'node',
'id' => 'nid',
'subtype' => 'type',
'subtypes' => xmlsitemap_node_get_types(),
),
);
function xmlsitemap_node_entity_info_alter(&$entity_info) {
foreach (node_type_get_names() as $type => $name) {
$types['node']['bundles'][$type] = array(
'xmlsitemap' => array(
'priority' => variable_get('xmlsitemap_node_priority_' . $type, 0.5),
'status' => variable_get('xmlsitemap_node_status_' . $type, 0),
),
);
}
}
/**
......
......@@ -2,18 +2,17 @@
// $Id$
/**
* Implements hook_xmlsitemap_link_info().
* Implements hook_entity_info_alter().
*/
function xmlsitemap_taxonomy_xmlsitemap_link_info() {
return array(
'taxononomy' => array(
'purge' => TRUE,
'table' => 'term_data',
'id' => 'tid',
'subtype' => 'vid',
'subtypes' => xmlsitemap_taxonomy_get_vids(),
),
);
function xmlsitemap_taxonomy_entity_info_alter(&$entity_info) {
foreach (taxonomy_vocabulary_get_names() as $machine_name => $vocabulary) {
$entity_info['taxonomy_term']['bundles'][$machine_name] = array(
'xmlsitemap' => array(
'priority' => variable_get('xmlsitemap_taxonomy_priority_' . $vocabulary->vid, 0.5),
'status' => variable_get('xmlsitemap_taxonomy_status_' . $vocabulary->vid, 0),
),
);
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment