function path_node_update
Implements hook_node_update().
File
-
modules/
path/ path.module, line 205
Code
function path_node_update($node) {
if (isset($node->path)) {
$path = $node->path;
$path['alias'] = isset($path['alias']) ? trim($path['alias']) : '';
// Delete old alias if user erased it.
if (!empty($path['pid']) && !$path['alias']) {
path_delete($path['pid']);
}
path_node_insert($node);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.