You are here

function xmlsitemap_node_node_update in XML sitemap 7.2

Implements hook_node_update().

2 calls to xmlsitemap_node_node_update()
xmlsitemap_node_comment_update in xmlsitemap_node/xmlsitemap_node.module
Implements hook_comment_update().
xmlsitemap_node_node_insert in xmlsitemap_node/xmlsitemap_node.module
Implements hook_node_insert().

File

xmlsitemap_node/xmlsitemap_node.module, line 96
Default file for XML sitemap node.

Code

function xmlsitemap_node_node_update(stdClass $node) {

  // Save a sitemap link with revoked access until the node permissions are
  // checked in the cron.
  $link = xmlsitemap_node_create_link($node);
  xmlsitemap_link_presave($link, array(
    $link['type'] => $node,
  ));

  // Node access can not be accurately determined in hook_node_update() because
  // node grants have not yet been written to the table, so we defer checking
  // node access permissions and process the sitemap link during cron.
  $queue = DrupalQueue::get('xmlsitemap_node');
  $queue
    ->createItem($node->nid);
}