You are here

function path_post_import in Default Content 7

Same name and namespace in other branches
  1. 7.2 plugins/path.inc \path_post_import()

Handles the loading of the current path after the node is loaded

File

plugins/path.inc, line 28

Code

function path_post_import($node) {
  if (isset($node->nid) && isset($node->exported_path)) {
    $path = array(
      'source' => 'node/' . $node->nid,
      'alias' => $node->exported_path,
    );
    if (isset($node->language)) {
      $path['language'] = $node->language;
    }
    path_save($path);
  }
}