function path_node_update
Implements hook_node_update().
Archivo
- drupal-7.x/
modules/ path/ path.module, line 205 - Enables users to rename URLs.
Código
function path_node_update($node) {
if (isset($node->path)) {
$path = $node->path;
$path['alias'] = trim($path['alias']);
// Delete old alias if user erased it.
if (!empty($path['pid']) && empty($path['alias'])) {
path_delete($path['pid']);
}
path_node_insert($node);
}
}